我无法安装 openssl 库,并且 openssl 命令不起作用,但 openssl 已安装

我无法安装 openssl 库,并且 openssl 命令不起作用,但 openssl 已安装

这是“openssl version”的输出:

Command 'openssl' not found, did you mean:

  command 'openssn' from deb openssn (1.4-3build1)

Try: sudo apt install <deb name>

以下是“sudo install libssl-dev”返回的内容:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libssl-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libssl-dev' has no installation candidate

当我尝试使用“sudo apt install openssl”安装 OpenSSL 时

Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssl is already the newest version (1.1.1f-1ubuntu2.13).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我怎样才能解决这个问题?

答案1

运行以下命令

sudo nano /etc/apt/sources.list

add deb http://security.ubuntu.com/ubuntu bionic-security main

sudo apt update && apt-cache policy libssl1.0-dev

sudo apt-get install libssl1.0-dev```

相关内容