我无法安装程序包libsnmp-perl。
我希望我粘贴的文字对你有帮助。
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
使用sudo apt-get install libsnmp-perl
会出现以下错误:
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.
libsnmp-perl : Depends: perl (>= 5.30.0-9ubuntu0.1) but 5.30.0-9build1 is to be installed
E: Unable to correct problems, you have held broken packages.
(添加)
使用apt-cache policy perl
:
perl:
Installed: 5.30.0-9build1
Candidate: 5.30.0-9build1
Version table:
*** 5.30.0-9build1 500
500 http://se.archive.ubuntu.com/ubuntu focal/main amd64 Packages
100 /var/lib/dpkg/status
答案1
列出可用版本:
sudo apt list libsnmp-perl -a
Listing... Done
libsnmp-perl/focal-updates,focal-security 5.8+dfsg-2ubuntu2.1 amd64 [upgradable from: 5.8+dfsg-2ubuntu2]
libsnmp-perl/focal,now 5.8+dfsg-2ubuntu2 amd64 [installed,upgradable to: 5.8+dfsg-2ubuntu2.1]
并且安装不是最后:
sudo apt install libsnmp-perl=5.8+dfsg-2ubuntu2
对我有用。