不知何故,我的系统上出现了两个版本的程序(puppet)。
t@desk:~$ /usr/local/bin/puppet --version
4.10.1
t@desk:~$ /usr/bin/puppet --version
4.10.8
在我看来,它们都是用 apt 管理的
t@desk:~$ apt show -a puppet
Package: puppet
Version: 3.8.5-2ubuntu0.1
...
Package: puppet
Version: 3.8.5-2
...
看看puppet 在启动板上发布历史记录,看起来 3.8.5-2 是较旧的版本。
我想删除它,但是删除时 apt 找不到该包:
t@desk:~$ sudo apt remove puppet=3.8.5-2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'puppet' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
...尽管能够列出它:
t@desk:~$ sudo apt show -a puppet=3.8.5-2
Package: puppet
Version: 3.8.5-2
...
apt-get
效果也好不到哪里去:
t@desk:~$ sudo apt-get remove puppet=3.8.5-2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'puppet' is not installed, so not removed
t@desk:~$ sudo apt-get install puppet=3.8.5-2
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:
puppet : Depends: puppet-common (= 3.8.5-2)
E: Unable to correct problems, you have held broken packages.
真的没有apt
找到包还是我(不知何故)创建了未处理的错误状态?
我唯一剩下的选择是手动卸载吗?