gpt4 book ai didi

linux - 无法在 LinuxMint 上构建 openssl-1.0.2n

转载 作者:太空宇宙 更新时间:2023-11-04 10:12:23 26 4
gpt4 key购买 nike

我正在尝试更新我的 OpenVPNOpenSSL。在将 openvpn 更新到 openvpn-2.4.4 时,我需要先将我的 openssl 更新到最新的 openssl-1.0.2n

$ cd~
$ wget https://openvpn.net/index.php/download/openvpn-2.4.4.tar.gz
$ sudo tar -zvxf openvpn--2.4.4.tar.gz
$ cd openvpn-2.4.4
$ sudo ./configure
$ sudo make
$ sudo make install

但是当我到达上面的 ./configure 时,我遇到了一个遗留 openssl 的问题,正如我之前提到的(我认为更新可以解决这个问题):

checking tap-windows.h presence... no
checking for tap-windows.h... no
checking whether TUNSETPERSIST is declared... yes
checking for setcon in -lselinux... no
checking for pam_start in -lpam... no
checking for PKCS11_HELPER... no
checking for OPENSSL... no
checking for SSL_CTX_new... no
configure: error: openssl check failed

所以我尝试了以下命令来更新到最新的 openssl :

$ cd /usr/src
$ wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz -O openssl-1.0.2n.tar.gz
$ tar -zxf openssl-1.0.2n.tar.gz
$ cd openssl-1.0.2n
$ ./config
$ sudo make
$ sudo make test
$ sudo make install
$ mv /usr/bin/openssl /root/
$ ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
$ openssl version

当我开始make test 时,我遇到了一个编译错误。我已将我的终端输出复制粘贴到此处,因为该输出非常大,错误在底部:pastebin

有什么建议可以解决这个问题吗?

RELEASE=18 sarah, EDITION=Cinnamon 32-bit, GRUB_TITLE=Linux Mint 18 Cinnamon 32-bit

最佳答案

从您的输出来看,您需要以 sudo 的身份运行所有三个命令,并且您错过了最初的 make

elliot@warmachine /usr/src/openssl-1.0.2n $ sudo ./config
...
elliot@warmachine /usr/src/openssl-1.0.2n $ make
...
/bin/sh: 1: cannot create buildinf.h: Permission denied
Makefile:58: recipe for target 'buildinf.h' failed

由于没有写入目录的权限而失败,这导致 sudo make test 失败,因为 openssl 尚未构建:

/usr/bin/ld: cannot find -lssl
collect2: error: ld returned 1 exit status

-l{library_name}ld 用来链接外部库的,这意味着测试找不到 openssl。所以应该在前面的步骤中构建

最后,以 root 身份构建软件是一种不好的做法。我的建议是以非特权用户身份构建它,然后以根用户身份安装。

$ cd ~
$ wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz -O openssl-1.0.2n.tar.gz
$ tar -zxf openssl-1.0.2n.tar.gz
$ cd openssl-1.0.2n
$ ./config
$ make
$ make test
$ sudo make install

关于linux - 无法在 LinuxMint 上构建 openssl-1.0.2n,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48217205/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com