インストールされたopensslを置き換えて独自のopensslビルド `make`スクリプトを使用するにはどうすればよいですか?

インストールされたopensslを置き換えて独自のopensslビルド `make`スクリプトを使用するにはどうすればよいですか?

私はLinuxverseに初めて接する人なので、標準的な(または愚かな)質問を投げても、理解してください。

opensslを削除する方法について多くの記事を見ましたが、ほとんどの人は一部の機能が中断される可能性があるため、削除しないでください。しかし、私は欲しい変えるmakeopensslのバージョンをインストールし、私自身のopensslを使用しました。スクリプトを実行しようとすると、出力に次のものが表示されるためです。

[root@instance-20240412-073452 linux]# make v=r && cp *.out ../work
#echo ../.objs/centos_r64
make -f Makefile.obj
make[1]: Entering directory `/home/ssh-key-2024-02-07/server/fd/LoginServer/linux'
make[1]: Nothing to be done for `objs'.
make[1]: Leaving directory `/home/ssh-key-2024-02-07/server/fd/LoginServer/linux'
make _all
make[1]: Entering directory `/home/ssh-key-2024-02-07/server/fd/LoginServer/linux'
g++  -L../library/Lwp/lib_centos_r64 -L../library/Mysql-5.7.16/centos_x64/lib -L../library/openssl-1.1.1a/centos_x64/lib -L../library/openssl-1.1.1a/centos_x64/lib/engines-1.1 -L../library/openssl-1.1.1a/centos_x64/lib/pkgconfig -L../library/protobuf-master-3.0.0/centos_x64/lib -L../library/zlib-1.2.8/centos_x64/lib -Wl,-rpath,../library/Lwp/lib_centos_r64 -Wl,-rpath,../library/Mysql-5.7.16/centos_x64/lib -Wl,-rpath,../library/openssl-1.1.1a/centos_x64/lib -Wl,-rpath,../library/openssl-1.1.1a/centos_x64/lib/engines-1.1 -Wl,-rpath,../library/openssl-1.1.1a/centos_x64/lib/pkgconfig -Wl,-rpath,../library/protobuf-master-3.0.0/centos_x64/lib -Wl,-rpath,../library/zlib-1.2.8/centos_x64/lib  ../.objs/centos_r64/main/CenterServer.cpp.o ../.objs/centos_r64/main/login.pb.cc.o ../.objs/centos_r64/main/loginLog.cpp.o ../.objs/centos_r64/main/LoginServer.cpp.o ../.objs/centos_r64/main/main.cpp.o -Wl,-dn   -Wl,-dy -lprotobuf -lcurl -lssl -lmysqlclient -ldl -lpthread -lrt -lLwp_r64 -Wl,-dy -o LoginServer_r64.out 
/bin/ld: warning: libssl.so.10, needed by /data/local/libs/curl-7.57.0/lib/libcurl.so, may conflict with libssl.so.1.1
/bin/ld: warning: libcrypto.so.10, needed by /data/local/libs/curl-7.57.0/lib/libcurl.so, not found (try using -rpath or -rpath-link)
/bin/ld: ../.objs/centos_r64/main/LoginServer.cpp.o: undefined reference to symbol 'HMAC@@OPENSSL_1_1_0'
../library/openssl-1.1.1a/centos_x64/lib/libcrypto.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [LoginServer_r64.out] Error 1
make[1]: Leaving directory `/home/ssh-key-2024-02-07/server/fd/LoginServer/linux'
make: *** [all] Error 2

私が懸念している具体的な警告は、これがmakeコンパイルに失敗することです。

/bin/ld: 警告: /data/local/libs/curl-7.57.0/lib/libcurl.soにはlibssl.so.10が必要で、libssl.so.1.1と競合する可能性があります。

opensslのバージョンを確認するために使用しようとすると、希望のバージョンがopenssl version表示されますが、OpenSSL 1.1.0c 10 Nov 2016私が知っている限りlibssl.so.10

libssl.so.10もしそうなら、コンパイル時に実行を無効にする方法はありますかmake?名前libssl.so.10を変更しようとしましたが、libssl.so.10.bakまだmake上記のエラーが表示されます。

ベストアンサー1

おすすめ記事