LAMP 架构的编译安装及错误完全分析
[root@localhost extra]# vi

[root@localhost bin]# pwd
/usr/local/apache2/bin
[root@localhost bin]# cp apachectl /etc/init.d/apache
[root@localhost ~]# service apache start
至于mysql5.6的编译安装可以参考
10、PHP的安装-----我这里用了5.3.27版本的php,没有用之前下载的5.3.10
./configure --with-apxs2=/usr/local/apache2/bin/apxs --disable-
ipv6 --with-libxml-dir=/usr --with-openssl=/usr --with-zlib=/usr --wit
h-bz2=/usr --with-curl=/usr --enable-ftp --with-mysql=/usr/local/mysq
l --with-mysql-sock=/var/run/mysqld/mysql5.socket --with-mysqli=/usr/
local/mysql/bin/mysql_config

.
######错误###########错误###########错误###########错误###########错误###########错误###########错误###########错误#####
错误1
APR Version: 1.4.5
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/src/lamp/;:
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure failed for srclib/apr
出现这种错误 很明显,没有安装gcc、c语言编译器
yum install gcc -y
-------------------------------
错误 2
config.status: creating test/internal/Makefile
config.status: creating include/arch/unix/apr_private.h
config.status: executing libtool commands
rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands
config.status: include/apr.h is unchanged
首先yum install libtool还是一样报错,在configure里面 RM='$RM -f' 这里的$RM后面一定有一个空格。 如果后面没有空格,直接连接减号,就依
然会报错。把RM='$RM'改为RM='$RM -f‘
-------------------------------
错误3
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
checking for BZ2_bzopen in -lbz2... no
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
checking readline/history.h usability... no
checking readline/history.h presence... no
checking for readline/history.h... no
checking for readline in -lreadline... no
** Cannot --enable-pcregrep-libbz2 because bzlib.h was not found
yum install bzip2-devel -y
------------------------------
错误4
/bin/sh ./libtool --tag=CXX --mode=compile -DHAVE_CONFIG_H -I. -c -o pcrecp
libtool: ignoring unknown tag CXX
libtool: unrecognized option `-DHAVE_CONFIG_H'
Try `libtool --help' for more information.
make[1]: *** [pcrecpp.lo] Error 1
make[1]: Leaving directory `/usr/src/lamp/pcre-7.9'
make: *** [all] Error 2
yum install gcc-c++ -y
评论