未找到软件包 openssh-client=1:6.6p1-2ubuntu2.7

未找到软件包 openssh-client=1:6.6p1-2ubuntu2.7

我正在尝试通过运行安装 openssh-client=1:6.6p1-2ubuntu2.7, apt-get install openssh-client=1:6.6p1-2ubuntu2.7但它抱怨

Version '1:6.6p1-2ubuntu2.7' for 'openssh-client' was not found

我是否需要此包的任何 repo?

答案1

首先你必须使用命令检查这个包的版本是否在存储库中:

sudo apt-get update
sudo apt-cache policy openssh-client

openssh-client:
  Installed: 1:6.6p1-2ubuntu2.8
  Candidate: 1:6.6p1-2ubuntu2.8
  Version table:
 *** 1:6.6p1-2ubuntu2.8 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1:6.6p1-2ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

如果此包可用,那么您可以使用以下命令进行安装:

sudo apt-get install openssh-client=1:6.6p1-2ubuntu1

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  ssh-askpass libpam-ssh keychain monkeysphere
The following packages will be REMOVED:
  openssh-server
The following packages will be DOWNGRADED:
  openssh-client
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 98 not upgraded.
Need to get 566 kB of archives.
After this operation, 961 kB disk space will be freed.
Do you want to continue? [Y/n] Y

如果不可用,那么您必须添加该存储库,然后更新缓存

sudo apt-get update

然后安装

sudo apt-get install openssh-client=1:6.6p1-2ubuntu2.7

或者

您可以下载.deb所需版本并使用进行安装dpkg

sudo dpkg -i package

编辑 :

似乎软件包版本1:6.6p1-2ubuntu2.7在存储库中不可用。您可以1:6.6p1-2ubuntu2.8使用

sudo apt-get install openssh-client=1:6.6p1-2ubuntu2.8

您可以检查可用的软件包版本存储库或者这里

相关内容