免费注册 查看新帖 |

Chinaunix

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

安装mod_perl时, make报错. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-08-17 09:39 |只看该作者 |倒序浏览
各位大神!
    小弟最近在学习mod_perl,安装make的时候总是出现下面这个错误,网上找资料也很少,头疼了好几天了。请大家帮我分析下社么原因呢?

make[1]: *** [mod_perl.so] Error 1
make[1]: Leaving directory `/usr/src/mod_perl-2.0.7/src/modules/perl'
make: *** [modperl_lib] Error 2



<note>  
os:                     rhel5_u7
perl:                  This is perl 5, version 16, subversion 1 (v5.16.1) built for x86_64-linux-thread-multi
apr:                   apr-1.4.6.tar ,
apr-util:             apr-util-1.4.1
apr-iconv:          apr-iconv-1.2.1
apache-http:      httpd-2.2.22
mod_perl:          mod_perl-2.0.7

论坛徽章:
7
巳蛇
日期:2014-04-10 08:54:57白羊座
日期:2014-04-22 20:06:262015年亚洲杯之沙特阿拉伯
日期:2015-02-10 14:18:532015年辞旧岁徽章
日期:2015-03-03 16:54:152015亚冠之吉达阿赫利
日期:2015-06-02 11:34:112015亚冠之武里南联
日期:2015-06-24 12:13:082015亚冠之阿尔纳斯尔
日期:2015-08-03 09:08:25
2 [报告]
发表于 2012-08-17 09:43 |只看该作者
你没给出错原因,下面这个只表示出错了,出错原因在下面三行之前。
illidanee 发表于 2012-08-17 09:39
make[1]: *** [mod_perl.so] Error 1
make[1]: Leaving directory `/usr/src/mod_perl-2.0.7/src/modules/perl'
make: *** [modperl_lib] Error 2

论坛徽章:
0
3 [报告]
发表于 2012-08-17 10:45 |只看该作者
本帖最后由 illidanee 于 2012-08-17 10:46 编辑
Monox 发表于 2012-08-17 09:43
你没给出错原因,下面这个只表示出错了,出错原因在下面三行之前。




这个是截图

论坛徽章:
0
4 [报告]
发表于 2012-08-17 11:12 |只看该作者
连接错误的~~ 查看下你下的位数对着没?

论坛徽章:
0
5 [报告]
发表于 2012-08-17 11:27 |只看该作者
xiyoulaoyuanjia 发表于 2012-08-17 11:12
连接错误的~~ 查看下你下的位数对着没?


能不能具体的说一下哪个地方位数不对呢?我OS是X86_64的。好像mod_perl 没有分位数啊 。

论坛徽章:
2
CU大牛徽章
日期:2013-04-17 11:46:28CU大牛徽章
日期:2013-04-17 11:46:39
6 [报告]
发表于 2012-08-17 11:28 |只看该作者
貌似加上 -fPIC 重新编译 libperl.a

论坛徽章:
7
巳蛇
日期:2014-04-10 08:54:57白羊座
日期:2014-04-22 20:06:262015年亚洲杯之沙特阿拉伯
日期:2015-02-10 14:18:532015年辞旧岁徽章
日期:2015-03-03 16:54:152015亚冠之吉达阿赫利
日期:2015-06-02 11:34:112015亚冠之武里南联
日期:2015-06-24 12:13:082015亚冠之阿尔纳斯尔
日期:2015-08-03 09:08:25
7 [报告]
发表于 2012-08-17 11:31 |只看该作者
回复 3# illidanee


    貌似你得重新编译 Perl,Configure 的时候加上 -Duseshrplib 选项,用来生成 libperl 的动态链接库。

论坛徽章:
0
8 [报告]
发表于 2012-08-17 11:31 |只看该作者
64 bit Linux
If while running make test while building mod_perl 2 you get an error like this:

  /usr/bin/ld: /usr/local/lib/perl5/5.10.1/x86_64-linux/CORE/libperl.a(op.o): \
  relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared \
                  object; recompile with -fPIC
  /usr/local/lib/perl5/5.10.1/x86_64-linux/CORE/libperl.a: could not read symbols: Bad \
                  value
You're likely on 64 bit Linux and will need to build Perl for that platform. You can do so by running Perl's Configure with the $CFLAGS environment variable and the -A and ccflags options. So if you normally build Perl with:

  % ./Configure -des
You would instead configure with:

  % CFLAGS='-m64 -mtune=nocona' ./Configure -des -A ccflags=-fPIC

论坛徽章:
0
9 [报告]
发表于 2012-08-17 11:32 |只看该作者
其它 详细可以看  安装文档~~  http://perl.apache.org/docs/2.0/user/install/install.html  

论坛徽章:
0
10 [报告]
发表于 2012-08-17 13:49 |只看该作者
xiyoulaoyuanjia 发表于 2012-08-17 11:32
其它 详细可以看  安装文档~~  http://perl.apache.org/docs/2.0/user/install/install.html




多谢,找到解决方法了。第一次看的时候没有看太仔细。没注意这个地方。现在问题解决了。

重新编译perl

CFLAGS='-m64 -mtune=nocona'
./Configure -des -A ccflags=-fPIC
make
make instal

然后重新安装mod_perl。正常。

下面是官方的资料说明。希望对遇到和我一样问题的朋友有帮助。

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP