【問題記錄】linux中apache升級過程中遇到的一些問題,make[2]: *** [ab] Error 1


Exception:httpd-2.4.39 編譯階段失敗,make[2]: *** [ab] Error 1

錯誤日志如下:

-1.la -luuid -lrt -lcrypt -lpthread -ldl -lm -L/usr/kerberos/lib64 -lssl -lcrypto -ldl -lz -luuid -lrt -lcrypt -lpthread
ab.o: In function `ssl_proceed_handshake':
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:744: undefined reference to `EVP_PKEY_id'
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:770: undefined reference to `EVP_PKEY_id'
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:756: undefined reference to `EVP_PKEY_get1_EC_KEY'
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:757: undefined reference to `EC_KEY_get0_group'
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:757: undefined reference to `EC_GROUP_get_curve_name'
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:758: undefined reference to `EC_KEY_free'
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:759: undefined reference to `EC_curve_nid2nist'
ab.o: In function `main':
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:2552: undefined reference to `TLSv1_1_client_method'
/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support/ab.c:2554: undefined reference to `TLSv1_2_client_method'
collect2: ld returned 1 exit status
make[2]: *** [ab] 錯誤 1
make[2]: Leaving directory `/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support'
make[1]: *** [all-recursive] 錯誤 1
make[1]: Leaving directory `/opt/aspire/product/sims20/setup/apache_new/httpd-2.4.39/support'
make: *** [all-recursive] 錯誤 1

 

 解決方法:安裝open-ssl 依賴庫,安裝httpd時需要加上

如下命令,安裝open-ssl:

[sims20@test openssl]# ./config -fPIC --prefix=path enable-shared
[sims20@test openssl]# ./config -t 
[sims20@test openssl]# make depend
[sims20@test openssl]# make
[sims20@test openssl]# make test
[sims20@test openssl]# make install

 以上安裝ok后,繼續安裝httpd,需要指定依賴庫安裝路徑,如下所示:

 [sims20@test httpd-2.4.39]  ./configure --prefix=apache-path --with-apr=apr-path --with-apr-util=apr-util-path --with-pcre=pcre-path --with-expat=expat-path --with-ssl=openssl-path --enable-so

安裝成功后,啟動apache:  /apache-path/bin/apachectl start

附圖:安裝的依賴庫信息

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM