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
附图:安装的依赖库信息