httpdビルドでOpensslが見つかりません

httpdビルドでOpensslが見つかりません

ソースからApacheを再構築しようとしましたが、以前に発生しなかった問題が発生しました。

私は過去に何度もソースからApacheバージョン2.4.57を構築しましたが、makeこの段階では問題はありませんでした。

私はApacheを捕まえました:

wget https://archive.apache.org/dist/httpd/httpd-2.4.57.tar.gz

設定してください:

./configure --prefix=/path/to/server --with-ssl=/opt/openssl/bin

そして、以下を構築してみてください。

make

ただし、次のエラーが発生します。

/usr/share/apr-1.0/build/libtool --silent --mode=link x86_64-linux-gnu-gcc  -pthread    \
         -o ab  ab.lo       /usr/lib/x86_64-linux-gnu/libaprutil-1.la /usr/lib/x86_64-linux-gnu/libapr-1.la -lm -lssl -lcrypto
/usr/bin/ld: ab.o: in function `ssl_print_cert_info':
ab.c:(.text+0xa94): undefined reference to `EVP_PKEY_get_bits'
/usr/bin/ld: ab.o: in function `ssl_print_info':
ab.c:(.text+0xc6c): undefined reference to `SSL_get1_peer_certificate'
/usr/bin/ld: ab.o: in function `ssl_proceed_handshake':
ab.c:(.text+0xe0c): undefined reference to `SSL_get1_peer_certificate'
/usr/bin/ld: ab.c:(.text+0xe2b): undefined reference to `EVP_PKEY_get_bits'
/usr/bin/ld: ab.c:(.text+0xefc): undefined reference to `EVP_PKEY_get_id'
/usr/bin/ld: ab.c:(.text+0xf2d): undefined reference to `EVP_PKEY_get_bits'
/usr/bin/ld: ab.c:(.text+0xf62): undefined reference to `EVP_PKEY_get_bits'
/usr/bin/ld: ab.c:(.text+0xff5): undefined reference to `EVP_PKEY_get_bits'
/usr/bin/ld: ab.c:(.text+0x102f): undefined reference to `EVP_PKEY_get_bits'
/usr/bin/ld: ab.c:(.text+0x103d): undefined reference to `EVP_PKEY_get_id'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:73: ab] Error 1
make[2]: Leaving directory '/srv/apache/httpd-2.4.57/support'
make[1]: *** [/srv/apache/httpd-2.4.57/build/rules.mk:75: all-recursive] Error 1
make[1]: Leaving directory '/srv/apache/httpd-2.4.57/support'
make: *** [/srv/apache/httpd-2.4.57/build/rules.mk:75: all-recursive] Error 1

解決策を試してください

最近たくさんプレイしましたが、バージョンpostfixの1つに問題が発生しましたopenssl。この問題を解決しようとしたときにシステムライブラリを変更したようですが、opensslApacheはビルドされません。

問題を解決しようとしている間、Openssl私のopensslバージョンがApacheバージョン2.4.57と比較してあまりにも現代的(3.2.1)であることが問題かもしれないと疑っていました。したがって、この投稿によると、次のようになります。 https://askubuntu.com/questions/1126893/how-to-install-openssl-1-1-1-and-libssl-package 1.1.1バージョンにダウングレードしました。このバージョンでビルドするようにApacheを設定しました。残念ながら幸運はありません。

オンラインで検索しても、この特定の問題に対する解決策が見つかりません。また、OpenSSL Apacheに必要なバージョンへの参照を見つけるのに苦労しています。あるいは、これらのライブラリを使用せずにビルドするようにApacheを設定できるかどうかを確認するのも困難です。たぶん./configure国旗でしょうか? SSLサポートなしで構築しても大丈夫です。

誰もが必要なバージョンのhttpdの特定の解決策や可能なヒントでこの状況を明らかにすることができれば幸いです。

修正する

私はコメントのアドバイスに従い、上記のopensslバージョン3.0.2のstackoverflow投稿に記載されているOpensslガイドラインを繰り返しました。を実行すると、make test一部のテストが失敗します。

Test Summary Report
-------------------
25-test_verify.t                 (Wstat: 512 Tests: 160 Failed: 2)
  Failed tests:  157-158
  Non-zero exit status: 2
80-test_cms.t                    (Wstat: 1792 Tests: 12 Failed: 7)
  Failed tests:  2-6, 9, 12
  Non-zero exit status: 7
80-test_ssl_new.t                (Wstat: 256 Tests: 30 Failed: 1)
  Failed test:  12
  Non-zero exit status: 1
Files=242, Tests=3284, 433 wallclock secs ( 8.33 usr  0.51 sys + 391.95 cusr 46.46 csys = 447.25 CPU)
Result: FAIL

これらのテストエラーにもかかわらず、Opensslをインストールし続けました。 Apacheを設定するとき:

./configure --with-ssl=/opt/openssl

エラーなし - 問題が修正されました。

これらのエラーが何を意味するのかは不明ですmake test。誰でもこれについて教えてくれてありがとう。

コメントと実際に確認された@steeldriverのおかげで、httpd-2.4.57をopenssl-3.0.2で使用できることを知っています。 httpdの依存関係要件を見つける方法は不明です。誰でも私を再び正しい方向に案内してくださるととても感謝します。

ベストアンサー1

おすすめ記事