linux下安装lamp环境时安装Apache报错,错误如下
make[4]:***[mod_deflate.la]错误1make[4]:Leavingdirectory`/lamp/httpd-2.2.9/modules/filt...
make[4]: *** [mod_deflate.la] 错误 1
make[4]: Leaving directory `/lamp/httpd-2.2.9/modules/filters'
make[3]: *** [shared-build-recursive] 错误 1
make[3]: Leaving directory `/lamp/httpd-2.2.9/modules/filters'
make[2]: *** [shared-build-recursive] 错误 1
make[2]: Leaving directory `/lamp/httpd-2.2.9/modules'
make[1]: *** [shared-build-recursive] 错误 1
make[1]: Leaving directory `/lamp/httpd-2.2.9'
make: *** [all-recursive] 错误 1 展开
make[4]: Leaving directory `/lamp/httpd-2.2.9/modules/filters'
make[3]: *** [shared-build-recursive] 错误 1
make[3]: Leaving directory `/lamp/httpd-2.2.9/modules/filters'
make[2]: *** [shared-build-recursive] 错误 1
make[2]: Leaving directory `/lamp/httpd-2.2.9/modules'
make[1]: *** [shared-build-recursive] 错误 1
make[1]: Leaving directory `/lamp/httpd-2.2.9'
make: *** [all-recursive] 错误 1 展开
展开全部
装apache会遇到许多问题,他们完全都是有解决办法的,你可以去google轻松找到他们。
以下是我帮你找的,转自csdn
在Linux Redhat6下面安装apache server的时候,执行完./configure命令后在执行make命令的时候报如下错误:/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_deflate.la] 错误 1
make[4]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[3]: *** [shared-build-recursive] 错误 1
make[3]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[2]: *** [shared-build-recursive] 错误 1
make[2]: Leaving directory `/usr/local/httpd-2.4.3/modules'
make[1]: *** [shared-build-recursive] 错误 1
make[1]: Leaving directory `/usr/local/httpd-2.4.3'
make: *** [all-recursive] 错误 1
解决方法
下载zlib-1.2.3.tar.gz放在/usr/local目录下执行以下命令:
tar -zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
vi Makefile
找到 CFLAGS=-O3 -DUSE_MMAP
在后面加入-fPIC,即变成CFLAGS=-O3 -DUSE_MMAP -fPIC
make && make install
然后再进入/usr/local/httpd-2.4.3这个目录执行下面的语句:
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --with-pcre=/usr/local/pcre/bin/pcre-config --with-zlib-1.2.3=/usr/local/zlib-1.2.3 --enable-so
以下是我帮你找的,转自csdn
在Linux Redhat6下面安装apache server的时候,执行完./configure命令后在执行make命令的时候报如下错误:/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_deflate.la] 错误 1
make[4]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[3]: *** [shared-build-recursive] 错误 1
make[3]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[2]: *** [shared-build-recursive] 错误 1
make[2]: Leaving directory `/usr/local/httpd-2.4.3/modules'
make[1]: *** [shared-build-recursive] 错误 1
make[1]: Leaving directory `/usr/local/httpd-2.4.3'
make: *** [all-recursive] 错误 1
解决方法
下载zlib-1.2.3.tar.gz放在/usr/local目录下执行以下命令:
tar -zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
vi Makefile
找到 CFLAGS=-O3 -DUSE_MMAP
在后面加入-fPIC,即变成CFLAGS=-O3 -DUSE_MMAP -fPIC
make && make install
然后再进入/usr/local/httpd-2.4.3这个目录执行下面的语句:
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --with-pcre=/usr/local/pcre/bin/pcre-config --with-zlib-1.2.3=/usr/local/zlib-1.2.3 --enable-so
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询