当我运行命令: sudo apt-get install snmpd 时出现以下错误
root@ubuntu:/home/ubuntu# sudo apt-get install snmpd Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-3.13.0-40-generic : Depends: linux-image-3.13.0-40-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-3.13.0-40-generic but it is not going to be installed
snmpd : Depends: libsnmp30 (>= 5.7.2~dfsg) but it is not going to be installed
Depends: libsnmp-base but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
请给我在服务器上安装 snmp 服务的解决方案。
提前致谢..
答案1
我不确定为什么会发生这种情况,但我在一些奇怪的情况下遇到过这种情况。一种简单的解决方法是手动安装每个依赖项。但是,由于 Apt 似乎在解决依赖项方面存在问题,因此这里可能存在更大的问题。虽然我无法具体帮助您,但您可以使用它来安装 snmpd:
sudo apt-get install snmpd libsnmp30 libsnmp-base
如果仍然出现 linux-image... 错误并阻止安装(不过,看起来不应该这样 - 这似乎是另一个问题)请尝试以下操作:
sudo apt-get install snmpd libsnmp30 libsnmp-base linux-image-generic linux-image-3.13.0-40-generic linux-image-extra-3.13.0-40-generic