Rumah > Soal Jawab > teks badan
因为主机无法链接外网,所以只能使用通过编译源码的方式进行安装,再make步骤上爆出了下面的错误。麻烦各位大神指点一下。
ranlib libpython3.5m.a
gcc -pthread -Xlinker -export-dynamic -o python Programs/python.o libpython3.5m.a -lpthread -ldl -lutil -lrt -lm
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: unknown encoding: GB18030
Current thread 0x00002b521aa8a330 (most recent call first):
/bin/sh: line 5: 2604 已放弃 ./python -E -S -m sysconfig --generate-posix-vars
generate-posix-vars failed
make: *** [pybuilddir.txt] 错误 1
在 ./configure
操作前,先进行配置
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN.UTF-8
问题解决来源: http://bbs.chinaunix.net/thread-3757465-1-1.html