pythonjam怎么安装模块_mod_python安装过程的问题解决记录

解压缩后,进入到目录中:

./configure --with-apxs=/usr/local/apache2/bin/apxs

然后又报错:

connobject.c:142: error: request for member ‘next’ in something not

a structure or union

apxs:Error: Command failed with rc=65536

.

make[1]: *** [mod_python.so] Error 1

make[1]: Leaving directory

`/root/django_python/mod_python-3.3.1/src'

make: *** [do_dso] Error 2

解决方法是:编辑

/root/soft/mod_python-3.3.1/src/connobject.c 的 142 行:

!(b == APR_BRIGADE_SENTINEL(b)

改成:

!(b == APR_BRIGADE_SENTINEL(bb) 即:改成两个b

然后再次执行make

继续出现问题如下:

/usr/bin/ld:

/usr/local/lib/python2.6/config/libpython2.6.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/python2.6/config/libpython2.6.a: could not read

symbols: Bad value

collect2: ld returned 1 exit status

apxs:Error: Command failed with rc=65536

.

make[1]: *** [mod_python.so] Error 1

make[1]: Leaving directory

`/root/django_python/mod_python-3.3.1/src'

make: *** [do_dso] Error 2

问题解决lib/usr/local/lib/python2.6/config/libpython2.6.a有问题,从其他地方拷贝过来编译成功。

此时如果生成mod_python.so,说明安装完成。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值