在搭建LAMP环境实践操作过程中我遇到的问题,和大家分享。
1、安装MySQL
2、安装Apache
我安装的是 http://apache.dataguru.cn/httpd/httpd-2.4.6.tar.gz 这个版本
wget http://apache.dataguru.cn/httpd/httpd-2.4.6.tar.gz
tar zvxf httpd-2.4.6.tar.gz
错误一
配置编译参数时候出错
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
是因为缺失apr 和 apr-util 两个包的问题,由于我的httpd版本太新,不用的httpd 源码包自带,必须自己手动去下载源码包
解决: apr-1.4.6.tar.gz下载地址:http://www.eu.apache.org/dist/apr/apr-1.4.6.tar.gz
apr-util-1.4.1.tar.gz下载地址:http://www.eu.apache.org/dist/apr/apr-util-1.4.1.tar.gz
cd /usr/local/src/httpd-2.4.6/srclib/ 下进行下载
wget http://www.eu.apache.org/dist/apr/apr-1.4.6.tar.gz
wget http://www.eu.apache.org/dist/apr/apr-util-1.4.1.tar.gz
tar zvxf apr-1.4.6.tar.gz httpd-2.4.6/srclib/apr
tar zvxf apr-util-1.4.1.tar.gz httpd-2.4.6/srclib/apr-util
错误二
再次配置参数时候出错
./configure --prefix=/cetv/apache --enable-mods-shared=most --enable-so
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring Apache Portable Runtime library ...
checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.3.3
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/cetv/apache/srclib/apr':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure failed for srclib/apr
我因为没有安装gcc的缘故
解决: yum install -y gcc
3、安装PHP
错误一堆,是因为要安装的包比较多。
configure: error: xml2-config not found. Please check your libxml2 installation.
解决 yum install -y libxml2-devel
configure: error: Cannot find OpenSSL's
解决 yum install -y openssl openssl-devel
checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution
解决 yum install -y bzip2 bzip2-devel
configure: error: png.h not found.
解决 yum install -y libpng libpng-devel
configure: error: freetype.h not found.
解决 yum install -y freetype freetype-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决
rpm -ivh "http://www.lishiming.net/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm"
yum install -y libmcrypt-devel
configure: error: jpeglib.h not found.
解决 yum install -y libjpeg-devel
1、安装MySQL
2、安装Apache
我安装的是 http://apache.dataguru.cn/httpd/httpd-2.4.6.tar.gz 这个版本
wget http://apache.dataguru.cn/httpd/httpd-2.4.6.tar.gz
tar zvxf httpd-2.4.6.tar.gz
错误一
配置编译参数时候出错
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
是因为缺失apr 和 apr-util 两个包的问题,由于我的httpd版本太新,不用的httpd 源码包自带,必须自己手动去下载源码包
解决: apr-1.4.6.tar.gz下载地址:http://www.eu.apache.org/dist/apr/apr-1.4.6.tar.gz
apr-util-1.4.1.tar.gz下载地址:http://www.eu.apache.org/dist/apr/apr-util-1.4.1.tar.gz
cd /usr/local/src/httpd-2.4.6/srclib/ 下进行下载
wget http://www.eu.apache.org/dist/apr/apr-1.4.6.tar.gz
wget http://www.eu.apache.org/dist/apr/apr-util-1.4.1.tar.gz
tar zvxf apr-1.4.6.tar.gz httpd-2.4.6/srclib/apr
tar zvxf apr-util-1.4.1.tar.gz httpd-2.4.6/srclib/apr-util
错误二
再次配置参数时候出错
./configure --prefix=/cetv/apache --enable-mods-shared=most --enable-so
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring Apache Portable Runtime library ...
checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.3.3
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/cetv/apache/srclib/apr':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure failed for srclib/apr
我因为没有安装gcc的缘故
解决: yum install -y gcc
3、安装PHP
错误一堆,是因为要安装的包比较多。
configure: error: xml2-config not found. Please check your libxml2 installation.
解决 yum install -y libxml2-devel
configure: error: Cannot find OpenSSL's
解决 yum install -y openssl openssl-devel
checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution
解决 yum install -y bzip2 bzip2-devel
configure: error: png.h not found.
解决 yum install -y libpng libpng-devel
configure: error: freetype.h not found.
解决 yum install -y freetype freetype-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决
rpm -ivh "http://www.lishiming.net/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm"
yum install -y libmcrypt-devel
configure: error: jpeglib.h not found.
解决 yum install -y libjpeg-devel
编辑回复