免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4004 | 回复: 5
打印 上一主题 下一主题

mod_python 安装出错,请高手指点 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-03-20 18:58 |只看该作者 |倒序浏览
我想安装Apahe+svn+Trac,其它的一切顺利,但就是安装mod_python报错,怎么都解决不了,请高手帮忙。谢谢!
环境版本如下:
[root@bogon mod_python-3.3.1]# rpm -qa | grep httpd
httpd-tools-2.2.15-29.el6.centos.x86_64
httpd-devel-2.2.15-29.el6.centos.x86_64
httpd-2.2.15-29.el6.centos.x86_64
[root@bogon mod_python-3.3.1]# rpm -qa | grep subversion
subversion-1.6.11-10.el6_5.x86_6

安装mod_python-3.3.1,在编译的时候出错。错误信息如下:
[root@bogon mod_python-3.3.1]# ./configure --prefix=/usr/local/mod_python/
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... no
checking for main in -lm... yes
checking for an ANSI C-conforming const... yes
checking your blood pressure... a bit high, but we can proceed
configure: checking whether apxs is available...
checking for --with-apxs... no
checking for apxs in /usr/local/apache/sbin... no
checking for apxs in your PATH... checking for apxs... /usr/sbin/apxs
found /usr/sbin/apxs, we'll use this. Use --with-apxs to specify another.
checking Apache version... 2.2.15
checking for Apache libexec directory... /usr/lib64/httpd/modules
checking for Apache include directory... -I/usr/include/httpd
checking for --with-python... no
checking for python... /usr/bin/python
checking Python version... 2.6
checking Python install prefix... /usr
checking checking where python libraries are installed... /usr/lib64/python2.6
checking for Py_NewInterpreter in -lpython2.6... no
configure: error: Can not link to python

[root@bogon mod_python-3.3.1]#

一直找不到解决办法,谢谢各位了!

论坛徽章:
11
技术图书徽章
日期:2014-03-01 14:44:34天蝎座
日期:2014-05-21 22:11:59金牛座
日期:2014-05-30 17:06:14
2 [报告]
发表于 2014-03-20 21:03 |只看该作者
有安装Python 3.3吗?

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
3 [报告]
发表于 2014-03-21 07:42 |只看该作者
需要 python-devel-2.6 的包.

论坛徽章:
0
4 [报告]
发表于 2014-03-21 08:28 |只看该作者
回复 2# timespace


[root@bogon ~]# rpm -qa | grep  python
python-setuptools-0.6.10-3.el6.noarch
python-libs-2.6.6-52.el6.x86_64
python-iniparse-0.3.1-2.1.el6.noarch
python-pycurl-7.19.0-8.el6.x86_64
newt-python-0.52.11-3.el6.x86_64
python-2.6.6-52.el6.x86_64
rpm-python-4.8.0-32.el6.x86_64
python-urlgrabber-3.9.1-8.el6.noarch
libproxy-python-0.3.0-4.el6_3.x86_64
[root@bogon ~]#

    安装了,python2.6.6

论坛徽章:
0
5 [报告]
发表于 2014-03-21 08:34 |只看该作者
回复 3# q1208c



多谢多谢! yum install python-devel 后编译通过了!

论坛徽章:
0
6 [报告]
发表于 2014-03-21 08:41 |只看该作者
另外之后make时遇到 了这个错:
..................................................
                from connobject.c:30:
/usr/include/python2.6/pyconfig-64.h:1043:1: warning: "_XOPEN_SOURCE" redefined
In file included from /usr/include/sys/types.h:26,
                 from /usr/include/apr-1/apr-x86_64.h:127,
                 from /usr/include/apr-1/apr.h:19,
                 from /usr/include/httpd/ap_config.h:25,
                 from /usr/include/httpd/httpd.h:43,
                 from /home/mod_python-3.3.1/src/include/mod_python.h:42,
                 from connobject.c:30:
/usr/include/features.h:164:1: warning: this is the location of the previous definition
connobject.c: In function 鈥榑conn_read鈥?
connobject.c:142: error: request for member 鈥榥ext鈥?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 `/home/mod_python-3.3.1/src'
make: *** [do_dso] Error 2
[root@bogon mod_python-3.3.1]#  

vi /src/connobject.c
将src目录的connobject.c中的
  !(b == APR_BRIGADE_SENTINEL(b) ||
  替换为
  !(b == APR_BRIGADE_SENTINEL(bb) ||

再make,就可以成功了。
然后make install.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP