我正在尝试降级 smbclient,因为它不再与 backuppc 配合使用。我已按照此帖子中的说明进行操作如何降级 Ubuntu 上的软件包?但它似乎不起作用。
我跑了
sudo apt-cache showpkg smbclient
sudo apt-get install smbclient=2:4.1.6+dfsg-1ubuntu2
但这没有任何作用。smbclient版本仍然是4.3.9-Ubuntu版本。
我尝试过清除 smbclient 然后重新安装。这导致依赖关系未得到满足。
vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get install smbclient=2:4.1.6+dfsg-1ubuntu2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
smbclient : Depends: samba-common (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.3.9+dfsg-0ubuntu0.14.04.1 is to be installed
Depends: samba-libs (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.3.9+dfsg-0ubuntu0.14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get install smbclient=2:4.1.6+dfsg-1ubuntu2 samba-common=2:4.1.6+dfsg-1ubuntu2 samba-libs=2:4.1.6+dfsg-1ubuntu2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
smbclient : Depends: samba-libs (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.3.9+dfsg-0ubuntu0.14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
vagrant@vagrant-ubuntu-trusty-64:~$
关于如何实现这个功能你有什么想法吗?
答案1
sudo aptitude install smbclient=2:4.1.6+dfsg-1ubuntu2
典型!经过几个小时的搜索,我在发布问题 2 分钟后找到了答案。Aptitude 负责处理依赖关系。我没有意识到 apt-get 不会这样做。