我无法通过 ssh 安装新包。
sudo apt-get install default-jdk
出现以下错误:
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
default-jdk : Depends: default-jre (= 2:1.8-56ubuntu2) but it is not going to be installed
Depends: default-jdk-headless (= 2:1.8-56ubuntu2) but it is not going to be installed
Depends: openjdk-8-jdk but it is not going to be installed
linux-image-extra-4.4.0-79-generic : Depends: linux-image-4.4.0-79-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-79-generic but it is not going to be installed
Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
当我尝试建议时sudo apt-get -f install
,显示了更多错误:
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-headers-4.4.0-43
linux-headers-4.4.0-43-generic linux-headers-4.4.0-45
linux-headers-4.4.0-45-generic linux-headers-4.4.0-47
linux-headers-4.4.0-47-generic linux-headers-4.4.0-51
linux-headers-4.4.0-51-generic linux-headers-4.4.0-53
linux-headers-4.4.0-53-generic linux-headers-4.4.0-57
linux-headers-4.4.0-57-generic linux-headers-4.4.0-59
linux-headers-4.4.0-59-generic linux-image-4.4.0-31-generic
linux-image-4.4.0-43-generic linux-image-4.4.0-45-generic
linux-image-4.4.0-47-generic linux-image-4.4.0-51-generic
linux-image-4.4.0-53-generic linux-image-4.4.0-57-generic
linux-image-4.4.0-59-generic linux-image-extra-4.4.0-31-generic
linux-image-extra-4.4.0-43-generic linux-image-extra-4.4.0-45-generic
linux-image-extra-4.4.0-47-generic linux-image-extra-4.4.0-51-generic
linux-image-extra-4.4.0-53-generic linux-image-extra-4.4.0-57-generic
linux-image-extra-4.4.0-59-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-image-4.4.0-79-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-79-generic
0 upgraded, 1 newly installed, 0 to remove and 167 not upgraded.
14 not fully installed or removed.
Need to get 0 B/21.9 MB of archives.
After this operation, 66.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 444493 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-79-generic_4.4.0-79.100_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-79-generic (4.4.0-79.100) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-79-generic_4.4.0-79.100_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.4.0-79-generic' to '/boot/vmlinuz-4.4.0-79-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-79-generic /boot/vmlinuz-4.4.0-79-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-79-generic /boot/vmlinuz-4.4.0-79-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.4.0-79-generic_4.4.0-79.100_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该怎么做才能修复安装?原始问题可能是什么?感谢您的任何建议。
编辑:启动分区必须是满df -h
的
Filesystem Size Used Avail Use% Mounted on
udev 1.8G 0 1.8G 0% /dev
tmpfs 370M 5.6M 364M 2% /run
/dev/mapper/server--samuel--vg-root 1.8T 8.9G 1.7T 1% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mapper/pdc_bbfbjjfjce1 472M 470M 0 100% /boot
tmpfs 370M 0 370M 0% /run/user/1000
有什么可以通过 ssh 来完成吗?或者是否需要在 cd 上启动才能修改分区?
答案1
您有许多不需要安装的内核。它们会占用启动分区的空间。
删除不需要的:
sudo apt-get autoremove
然后修复你的依赖关系:
sudo apt-get -f install
然后做你最初想做的事情:
sudo apt-get install default-jdk