chmod: cannot access `/usr/local/apache2/modules/libphp5.so': No such file

Installing PHP SAPI module: apache2handler

/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apr/build-1/libtool --mode=install install libphp5.la /usr/local/apache2/modules/
libtool: install: install .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: install .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
libtool: install: chmod 644 /usr/local/apache2/modules/libphp5.a
libtool: install: ranlib /usr/local/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /home/ligl/src/php5/libs'
Warning! dlname not found in /usr/local/apache2/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp5.so
chmod: cannot access `/usr/local/apache2/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536

1.是由于libtool版本不一致造成的。
把apache 目录build下面的libtool拷贝到了php编译安装的目录下,make clean 再重新configure ,make  ,make install,就行了。
比如我的apache安装在/usr/local/apache/ ,php-5.3.6为下载的php解压目录
cp /usr/local/apache/build/libtool php-5.3.6/

Both Apache2 and PHP have and is using the correct version:

# pwd
/usr/local/src/php5-200404070830
# ./libtool --version
ltmain.sh (GNU libtool) 1.4.3 (1.922.2.110 2002/10/23 01:39:54)

# /usr/local/apache2/build/libtool --version
ltmain.sh (GNU libtool) 1.4.3 (1.922.2.110 2002/10/23 01:39:54) 

sudo cp /usr/bin/libtool /usr/local/apache2/build/

find / -name libphp5.so

First make sure libphp5.so isn't there. It's usually in the libs or .libs subdirectory. Run find from the PHP source directory root: find . -name libphp5.so If that doesn't work, make sure you use the --with-apxs2 option with the correct directory in ./configure . For example:
./configure --with-mysql --with-apxs2=/path/to/apache/apxs
When re-running ./configure always start with a fresh, clean source directory (no object).

2.原因是没有安装 libtool

# apt-get install libtool

无法生成so文件

你./configure --help看看
apache2.0.48是用的 --enable-so 这样的参数呀

猜你喜欢

转载自hudeyong926.iteye.com/blog/1059390