bgey 发表于 2015-8-21 07:32:52

搭建LAMP环境,在最后一步编译PHP有一个错误和解决办法

  在最后一步编译PHP时,make命令后当要用make install安装时弹出了一个错误提示:
  /usr/local/src/php-5.3.5/sapi/cli/php: error while loading shared libraries: libltdl.so.3: cannot open shared object file: No such file or directory
  这可能是共享库设置的问题,其中libltdl.so.3在我的/usr/local/lib下。
  上网找了一些文章,其中有个方法特有效:
  在ld.so.conf文件追加上/usr/local/lib,可以通过下面的命令完成:
  echo "/usr/local/lib" >> /etc/ld.so.conf
  然后确认(执行这个命令):
  make clean
  ldconfig。
  这时再试一下就没有问题了。
页: [1]
查看完整版本: 搭建LAMP环境,在最后一步编译PHP有一个错误和解决办法