Board logo

标题: python 'libinstall' failed [libinstall] Error 1 解决办法 [打印本页]

作者: linda    时间: 2019-7-11 18:52     标题: python 'libinstall' failed [libinstall] Error 1 解决办法

在已有python的系统中通过源代码编译升级python,在make install 时 出现错误:

Makefile:1092: recipe for target 'libinstall' failed
make: *** [libinstall] Error 1

是因为系统已有lib目录,需要改名,再make install

例如:
./configure --prefix=/usr/
mv /usr/lib/python2.7 /usr/lib/python2.7.org
make install


./configure
mv /usr/local/lib/python2.7 /usr/local/lib/python2.7.org
make install

# ls -alt /usr/local/bin/python*
lrwxrwxrwx 1 root root      14 Jul 11 19:19 /usr/local/bin/python-config -> python2-config
lrwxrwxrwx 1 root root      16 Jul 11 19:19 /usr/local/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root       9 Jul 11 19:19 /usr/local/bin/python2 -> python2.7
lrwxrwxrwx 1 root root       7 Jul 11 19:19 /usr/local/bin/python -> python2
-rwxr-xr-x 1 root root    1687 Jul 11 19:19 /usr/local/bin/python2.7-config
-rwxr-xr-x 1 root root 8848472 Jul 11 19:19 /usr/local/bin/python2.7
---------
add-apt-repository ppa:deadsnakes/ppa
Please use this repository instead of ppa:fkrull/deadsnakes.
66% [Connecting to ppa.launchpad.net (91.189.95.83)]        

apt-get update

apt install python3.8

apt install python3.7

参考:
https://github.com/docker-library/python/issues/114
http://juniway.blogspot.com/2015/12/build-python-from-source.html
https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa

[ 本帖最后由 linda 于 2019-7-11 19:22 编辑 ]




欢迎光临 中神通公司技术论坛 (http://trustcomputing.com.cn/bbs/) Powered by Discuz! 6.0.0