安装SNMP并不像我想象的那么容易

四处寻找如何安装SNMP。 找到多个例子:

只需运行“apt-get install snmpd”…..

但是当我这样做时,我会遇到错误。 我说的是:首先运行ap-get install snmpd,但它失败并告诉我尝试“apt-get -f install”,但是失败并告诉我尝试“apt autoremove”但是失败并告诉我尝试“apt-get -f install”,但失败了…… [重复乐趣圈]。

只想让这个Linux服务器(Ubuntu 16.04.1 LTS)在公共端口161上运行SNMP。基本上默认。

有任何想法吗? 我是Linux的新手。 对于所有依赖项,我是否只运行这样的命令?:

apt-get install linux-image-4.4.0-62-generic

apt-get install linux-image-4.4.0-64-generic

apt-get install linux-image-generic

apt-get install thermald

apt-get install libsnmp30

apt-get install libsnmp-base

等……等等……

我不熟悉Linux,所以如果你有建议,请解释如何完成这些建议。

这是我正在经历的确切循环:

root@MYSERVER:/etc# 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-4.4.0-62-generic : Depends: linux-image-4.4.0-62-generic but it is not going to be installed linux-image-extra-4.4.0-64-generic : Depends: linux-image-4.4.0-64-generic but it is not going to be installed linux-image-generic : Depends: linux-image-4.4.0-64-generic but it is not going to be installed Recommends: thermald but it is not going to be installed snmpd : Depends: libsnmp30 (= 5.7.3+dfsg-1ubuntu4) 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). root@MYSERVER:/etc# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic linux-headers-4.4.0-62 linux-headers-4.4.0-62-generic linux-image-4.4.0-51-generic linux-image-4.4.0-62-generic linux-image-extra-4.4.0-51-generic linux-image-extra-4.4.0-62-generic Use 'apt autoremove' to remove them. The following additional packages will be installed: linux-image-4.4.0-62-generic linux-image-4.4.0-64-generic Suggested packages: fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools The following NEW packages will be installed: linux-image-4.4.0-62-generic linux-image-4.4.0-64-generic 0 upgraded, 2 newly installed, 0 to remove and 198 not upgraded. 21 not fully installed or removed. Need to get 0 B/43.1 MB of archives. After this operation, 131 MB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 346980 files and directories currently installed.) Preparing to unpack .../linux-image-4.4.0-64-generic_4.4.0-64.85_amd64.deb ... Done. Unpacking linux-image-4.4.0-64-generic (4.4.0-64.85) ... dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-64-generic_4.4.0-64.85_amd64.deb (--unpack): cannot copy extracted data for './boot/vmlinuz-4.4.0-64-generic' to '/boot/vmlinuz-4.4.0-64-generic.dpkg-new': failed to write (No space left on device) No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-64-generic /boot/vmlinuz-4.4.0-64-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-64-generic /boot/vmlinuz-4.4.0-64-generic Preparing to unpack .../linux-image-4.4.0-62-generic_4.4.0-62.83_amd64.deb ... Done. Unpacking linux-image-4.4.0-62-generic (4.4.0-62.83) ... dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-62-generic_4.4.0-62.83_amd64.deb (--unpack): cannot copy extracted data for './boot/vmlinuz-4.4.0-62-generic' to '/boot/vmlinuz-4.4.0-62-generic.dpkg-new': failed to write (No space left on device) No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-4.4.0-64-generic_4.4.0-64.85_amd64.deb /var/cache/apt/archives/linux-image-4.4.0-62-generic_4.4.0-62.83_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) root@MYSERVER:/etc#