运行 Ubuntu 14.04 LTS 服务器版本。最近开始使用 snmpd 时出现以下错误:
Setting up snmpd (5.7.2~dfsg-8.1ubuntu3.1) ...
update-rc.d: warning: stop runlevel arguments (1) do not match snmpd Default-Stop values (0 1 6)
* Starting network management services: invoke-rc.d: initscript snmpd, action "start" failed.
dpkg: error processing package snmpd (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libsvn1:amd64 (1.8.8-1ubuntu3.2) ...
Setting up subversion (1.8.8-1ubuntu3.2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Errors were encountered while processing:
snmpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
以下是 apt-cache policy snmpd 的输出:
root@maleficent:/home/dlanier# apt-cache policy snmpd
snmpd:
Installed: 5.7.2~dfsg-8.1ubuntu3.1
Candidate: 5.7.2~dfsg-8.1ubuntu3.1
Version table:
*** 5.7.2~dfsg-8.1ubuntu3.1 0
500 http://us.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
5.7.2~dfsg-8.1ubuntu3 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
答案1
我也遇到了同样的问题。
sudo dpkg --purge snmp
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libmysqlclient18 libperl5.18 libsnmp30 mysql-common Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: snmpd* 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded. 1 not fully installed or removed. After this operation, 232 kB disk space will be freed. Do you want to continue? [Y/n] Y
哎呀......它是 perl、mysql 和 snmp lib。
sudo apt-get purge snmpd
把那个也删掉。不只是配置文件。
如果您想删除这些
AUTOREMOVE
消息和/或您确实需要这些软件包,只需删除并重新安装这些软件包即可。sudo apt-get autoremove
随意修改:
sudo apt-get install libperl5.18 libsnmp30 libmysqlclient18 mysql-common