Heim  >  Artikel  >  Backend-Entwicklung  >  安装php时提示chmod: 无法访问 “/usr/local/apache2/modules/libphp5.so”

安装php时提示chmod: 无法访问 “/usr/local/apache2/modules/libphp5.so”

WBOY
WBOYOriginal
2016-06-06 20:51:461946Durchsuche

configure和make都正常,在make install的时候就会出错,错误提示如下:

[root@localhost php-5.2.17]# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
chmod 644 /usr/local/apache2/modules/libphp5.a
ranlib /usr/local/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.2.17/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: 无法访问 “/usr/local/apache2/modules/libphp5.so”: 没有那个文件或目录
apxs:Error: Command failed with rc=65536

make: *** [install-sapi] 错误 1

看错误提示是libphp5.so没有编译出来,但是为啥没编译出来呢?

configure参数如下:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-openssl --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-ftp --with-gd --enable-gd-native-ttf --with-gettext --with-mhash --enable-mbstring --with-mcrypt --enable-soap --enable-zip --with-iconv=/usr/local/libiconv --with-mysql=/usr/local/mysql

apache版本为2.2.14
php版本为5.2.17

搜了N多解决办法都没解决问题,包括libtool的版本,apache的编译参数等

回复内容:

configure和make都正常,在make install的时候就会出错,错误提示如下:

[root@localhost php-5.2.17]# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
chmod 644 /usr/local/apache2/modules/libphp5.a
ranlib /usr/local/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.2.17/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: 无法访问 “/usr/local/apache2/modules/libphp5.so”: 没有那个文件或目录
apxs:Error: Command failed with rc=65536

make: *** [install-sapi] 错误 1

看错误提示是libphp5.so没有编译出来,但是为啥没编译出来呢?

configure参数如下:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-openssl --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-ftp --with-gd --enable-gd-native-ttf --with-gettext --with-mhash --enable-mbstring --with-mcrypt --enable-soap --enable-zip --with-iconv=/usr/local/libiconv --with-mysql=/usr/local/mysql

apache版本为2.2.14
php版本为5.2.17

搜了N多解决办法都没解决问题,包括libtool的版本,apache的编译参数等

看这个链接是否可以解决跟你的错误是一样的。
http://forums.fedoraforum.org/archive...

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn