python2.7.2的安装

安装python2.7的时候加入--enable-shared参数时,在make阶段会有一下错误

 

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libpython2.7.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

 

我的解决方法是make && make install 执行2遍就可以通过了,具体原因不知道...,以下是我的操作记录

 

[root@vhost141 Python-2.7.2] ./configure --enable-shared

 

[root@vhost141 Python-2.7.2]make && make install

 

[root@vhost141 Python-2.7.2]whereis libpython2.7.so.1.0                                  
libpython2.7.so.1: /usr/local/lib/libpython2.7.so.1.0

 

[root@vhost141 Python-2.7.2] vi /etc/ld.so.conf

 

include ld.so.conf.d/*.conf
/usr/local/lib/

 

[root@vhost141 Python-2.7.2] /sbin/ldconfig

[root@vhost141 Python-2.7.2] /sbin/ldconfig -v | grep libpython2.7.so

 

  libpython2.7.so.1.0 -> libpython2.7.so.1.0

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值