麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 網站 > Apache > 正文

【問題記錄】 Linux 安裝 apache 遇到的一些問題

2024-08-27 18:29:19
字體:
來源:轉載
供稿:網友
【問題記錄】 linux 安裝 apache 遇到的一些問題
以下為linux上安裝apache時自己遇到的一些問題,記錄在這,以后遇到時也會不定時更新...
一.安裝Apache提示APR not found的解決辦法

解決方法:

1. 網站 http://apr.apache.org/download.cgi 下載 apr-1.5.1.tar.gz 、apr-util-1.5.4.tar.gz

2. 網站 http://www.pcre.org/ 下載 pcre-8.36.tar.gz

3.依次解壓、安裝

附相關命令:

1 [root@test ~]# tar -zxvf xxx.tar.gz2 [root@test ~]# ./configure --prefix=path  //path為安裝路徑3 [root@test ~]# make4 [root@test ~]# make install

4. apache 設置指定庫位置

1 [root@test ~]#  ./configure --prefix=/usr/local/httpd-2.4.10 --with-apr=apr-path  --with-apr-util=aprutil-path  --with-pcre=pcre-path  --enable-so  //把path修改成各自的安裝路徑即可

5. make && make install

二、/xxx/httpd-2.4.x/support/ab.c:2273: undefined reference to `TLSv1_2_client_method'、/xxx/httpd-2.4.x/support/ab.c:2271: undefined reference to `TLSv1_1_client_method'

錯誤日志:

...ab.o: In function `main':/xxx/httpd-2.4.x/support/ab.c:2273: undefined reference to `TLSv1_2_client_method'/xxx/httpd-2.4.x/support/ab.c:2271: undefined reference to `TLSv1_1_client_method'collect2: ld returned 1 exit statusmake[2]: *** [ab] Error 1make[2]: Leaving directory `/xxx/httpd-2.4.x/support'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/xxx/httpd-2.4.x/support'make: *** [all-recursive] Error 1

解決方法:

open-ssl 庫有問題, 安裝時需要加上

1 [root@test ~]# ./config -fPIC --prefix=path enable-shared2 [root@test ~]# ./config -t3 [root@test ~]# make depend4 [root@test ~]# make5 [root@test ~]# make test 6 [root@test ~]# make install

然后安裝apache時指定

1 [root@test ~]# ./configure --prefix=/usr/local/httpd-2.4.10  --with-ssl=openssl-path --enable-so

三、relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

錯誤日志:

 1 make[4]: Entering directory `/home/zfh/httpd-2.2.9/modules/filters' 2 /home/user/httpd-2.2.9/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread    -L/usr/local/zlib//lib      -o mod_deflate.la -rpath /usr/local/apache2/modules -module -avoid-version  mod_deflate.lo -lz 3 /usr/bin/ld: /usr/local/zlib//lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC 4 /usr/local/zlib//lib/libz.a: could not read symbols: Bad value //注意這行 5 collect2: ld returned 1 exit status 6 make[4]: *** [mod_deflate.la] Error 1 7 make[4]: Leaving directory `/home/zfh/httpd-2.2.9/modules/filters' 8 make[3]: *** [shared-build-recursive] Error 1 9 make[3]: Leaving directory `/home/zfh/httpd-2.2.9/modules/filters'10 make[2]: *** [shared-build-recursive] Error 111 make[2]: Leaving directory `/home/zfh/httpd-2.2.9/modules'12 make[1]: *** [shared-build-recursive] Error 113 make[1]: Leaving directory `/home/zfh/httpd-2.2.9'14 make: *** [all-recursive] Error 115 [root@localhost httpd-2.2.9]# 

錯誤為zlib庫有問題,錯誤中有提示 recompile with -fPIC 即加上 -fPIC進行編譯。

解決方法:

1. 找到zlib的源碼安裝包,或者直接下載一個 。地址:http://www.zlib.net/

2. 執行以下相關命令

[root@test ~]# tar -zxvf zlib-1.2.3.tar.gz[root@test ~]# cd zlib-1.2.3[root@test ~]# ./configure --prefix=path //path為自定義安裝路徑[root@test ~]# vi Makefile[root@test ~]# 找到 CFLAGS=-O3 -DUSE_MMAP[root@test ~]# 在后面加入-fPIC,即變成CFLAGS=-O3 -DUSE_MMAP -fPIC[root@test ~]# make && make install

3. 安裝apache,添加 --with-zlib-1.2.3=zlib-path 參數

1 [root@test ~]#  ./configure --prefix=/usr/local/httpd-2.4.10 --with-zlib-1.2.3=zlib-path  --enable-so  //把path修改成各自的安裝路徑即可

未完待續...


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 成人在线观看免费高清 | 91看片成人| 77成人影院 | 成人激情视频网站 | 49vvv| 久草在线新时代视觉 | lutube成人福利在线观看污 | 青青国产在线视频 | 天天看天天摸天天操 | 黄色成人av在线 | 青青青在线免费 | 99精品热视频 | 午夜小电影 | 亚洲国产馆 | 欧美日韩免费在线观看视频 | 视频一区二区精品 | 日本在线播放一区二区三区 | 欧美激情猛片xxxⅹ大3 | 视频一区国产 | av电影在线观看免费 | 2021狠狠操 | 91久久国产露脸精品免费 | 成码无人av片在线观看网站 | 国产精品视频二区不卡 | 欧美在线观看视频一区 | 欧美成人一区二区三区电影 | 久久逼逼| 欧美一级淫片免费播放口 | 欧美日韩手机在线观看 | 老女人碰碰在线碰碰视频 | 国产99久久精品 | 一级大片久久 | 羞羞视频免费观看网站 | 午夜看毛片 | 鲁久久| 深夜影院一级毛片 | 午夜色视频在线观看 | 久久99国产视频 | 在线男人天堂 | 国产成人在线免费视频 | 毛片小网站 |