我是 Linuxverse 的新手,所以如果我问的是标准(或者可能是愚蠢的)问题,请理解。
我看过很多关于如何删除 openssl 的帖子,但大多数人都告诉不要删除它,因为它可能会破坏某些功能。但是我要代替安装了 openssl 版本并使用了我自己的 openssl,因为当我尝试运行make
脚本时,输出告诉我
[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
.或者也许我搞乱了 openssl,所以我的 centos 中安装了 2 个 openssl?
那么有什么方法可以libssl.so.10
在编译时禁用运行吗make
?我尝试重命名libssl.so.10
为libssl.so.10.bak
但make
仍然显示上述错误。