在编译lamp(http2.2.2+mysql5.1.73+php5.3.22)环境的时候遇到一个奇怪的报错:
错误代码(php5.3.22):SourceByrd's Weblog-https://note.t4x.org/error/apxs-error-command-failed-with-rc/
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[root@Test php-5.3.22]# make install Installing PHP SAPI module: apache2handler /application/httpd2.2.22/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp5.la /application/httpd2.2.22/modules /usr/local/apr/build-1/libtool --mode=install cp libphp5.la /application/httpd2.2.22/modules/ libtool: install: cp .libs/libphp5.lai /application/httpd2.2.22/modules/libphp5.la libtool: install: cp .libs/libphp5.a /application/httpd2.2.22/modules/libphp5.a libtool: install: chmod 644 /application/httpd2.2.22/modules/libphp5.a libtool: install: ranlib /application/httpd2.2.22/modules/libphp5.a libtool: install: warning: remember to run `libtool --finish /byrd/tools/php-5.3.22/libs' Warning! dlname not found in /application/httpd2.2.22/modules/libphp5.la. Assuming installing a .so rather than a libtool archive. chmod 755 /application/httpd2.2.22/modules/libphp5.so chmod: cannot access `/application/httpd2.2.22/modules/libphp5.so': No such file or directory apxs:Error: Command failed with rc=65536 make: *** [install-sapi] Error 1 |
错误代码(php5.5.x):
0 1 2 3 4 5 6 7 |
configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: /application/php5.3.22 configure: WARNING: unrecognized options: --enable-zend-multibyte checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking build system type... Invalid configuration `/application/php5.3.22': machine `/application/php5.3.22' not recognized configure: error: /bin/sh ./config.sub /application/php5.3.22 failed |
解决方法:SourceByrd's Weblog-https://note.t4x.org/error/apxs-error-command-failed-with-rc/
--prefix= /application/php5.5.11 \
修改为【一个空格惹的祸!!!】
--prefix=/application/php5.5.11 \ SourceByrd's Weblog-https://note.t4x.org/error/apxs-error-command-failed-with-rc/
其实php5.3.22居然可以编译过去,只是在make install才报错,5.5.x就直接报错了,后来仔细看了文档才发现这个错误。。word文档啊!!SourceByrd's Weblog-https://note.t4x.org/error/apxs-error-command-failed-with-rc/
参考文档:http://blog.chinaunix.net/uid-26719405-id-3482060.htmlSourceByrd's Weblog-https://note.t4x.org/error/apxs-error-command-failed-with-rc/ SourceByrd's Weblog-https://note.t4x.org/error/apxs-error-command-failed-with-rc/
上海市 1F
拜读了,欢迎博主回访
上海市 B1
@ 浙江经济网 好的