2012-03-17 15 views
1

我有一个错误,而安装的乘客。 #乘客安装-Apache2的模块不能安装乘客。 APR的-1.A:看不懂的符号:坏值

我的环境是

  • CentOS版本5.7(最终)
  • httpd.x86_64 2.2.3-63.el5.centos.1
  • 的Phusion客运3.0 0.11

任何帮助表示赞赏。提前致谢。


g++ -shared ext/apache2/Configuration.o ext/apache2/Bucket.o ext/apache2/Hooks.o ext/apache2/mod_passenger.o -fPIC -o ext/apache2/mod_passenger.so -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1 -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -I/usr/include/httpd -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/apache2/module_libpassenger_common.a ext/apache2/module_libboost_oxt.a -fPIC -lapr-1 -laprutil-1 -lpthread 

/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libapr-1.a(apr_strings.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC 

/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libapr-1.a: could not read symbols: Bad value 

collect2: ld returned 1 exit status 

rake aborted! 

Command failed with status (1): [g++ -shared ext/apache2/Configuration.o ex...] 

Tasks: TOP => apache2 => ext/apache2/mod_passenger.so 
+0

尝试'CXXFLAGS = -fPIC ./configure'后重建 – bkconrad 2012-03-17 05:14:25

+0

您可能会在ServerFault.com获得更多帮助 – 2012-03-17 05:14:39

+0

谢谢大家。咨询你所有的答案,我尝试了各种方法并设法安装乘客。我不知道哪个是确定的解决方案,但可能重新安装apr,httpd-devel,httpd和php都有效。 – anchor 2012-03-18 12:00:09

回答

1

尝试重新编译--enable-shared标志红宝石。

+0

谢谢你的回答。 – anchor 2012-03-18 12:03:20

+0

如何做到这一点? – 2012-04-07 15:31:45

+1

如果通过RVM安装红宝石, 'RVM重新安装1.9.3 -C --enable-shared' 是为了做到这一点。 – 2013-10-08 16:15:59