VPS侦探论坛

 找回密码
 注册
查看: 14169|回复: 0

[Apache] Apache编译安装php错误 libphp5.so : No such file or directory apxs:Error: Command faile

[复制链接]
发表于 2011-4-22 22:39:34 | 显示全部楼层 |阅读模式

  1. [root@vpser php-5.3.6]# make install
  2. Installing PHP SAPI module:       apache2handler
  3. /usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp5.la /usr/local/apache/modules
  4. /usr/local/apache/build/libtool --mode=install cp libphp5.la /usr/local/apache/modules/
  5. cp .libs/libphp5.lai /usr/local/apache/modules/libphp5.la
  6. cp .libs/libphp5.a /usr/local/apache/modules/libphp5.a
  7. chmod 644 /usr/local/apache/modules/libphp5.a
  8. ranlib /usr/local/apache/modules/libphp5.a
  9. libtool: install: warning: remember to run `libtool --finish /root/lnmpa/php-5.3.6/libs'
  10. Warning!  dlname not found in /usr/local/apache/modules/libphp5.la.
  11. Assuming installing a .so rather than a libtool archive.
  12. chmod 755 /usr/local/apache/modules/libphp5.so
  13. chmod: cannot access `/usr/local/apache/modules/libphp5.so': No such file or directory
  14. apxs:Error: Command failed with rc=65536
  15. .
  16. make: *** [install-sapi] Error 1
复制代码

是由于libtool版本不一致造成的。

把apache 目录build下面的libtool拷贝到了php编译安装的目录下,重新make clean 和make  ,make install,就行了。

比如我的apache安装在/usr/local/apache/ ,php-5.3.6为下载的php解压目录
cp /usr/local/apache/build/libtool php-5.3.6/
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-23 13:36 , Processed in 0.024365 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表