온라인으로 검색했고 터미널에서 제안 사항을 따랐지만 그 중 어느 것도 효과가 없었습니다. 아래는 제가 겪고 있는 문제입니다. 오래된 커널을 제거하는 코드가 손상된 것처럼 보이지만 이를 수정하려면 더 많은 공간이 필요합니다. 이것이 저의 전체 목적입니다. 나는 Linux를 처음 접한 사람이고 결코 코더가 아니므로 솔직하게 말해 주시기 바랍니다.
$ sudo apt autoremove
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.13.0-36-generic : Depends: linux-image-4.13.0-36-generic but it is not installed
linux-image-generic-hwe-16.04 : Depends: linux-image-4.13.0-36-generic but it is not installed
linux-signed-image-4.13.0-36-generic : Depends: linux-image-4.13.0-36-generic (= 4.13.0-36.40~16.04.1) but it is not installed
E: Unmet dependencies. Try using -f.
hunter@hunter-Satellite-C55-C:~$ apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
$ sudo 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:
libllvm4.0 linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic
linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
linux-headers-4.10.0-40 linux-headers-4.10.0-40-generic
linux-headers-4.10.0-42 linux-headers-4.10.0-42-generic
linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic
linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic
linux-image-4.10.0-40-generic linux-image-4.10.0-42-generic
linux-image-4.13.0-26-generic linux-image-extra-4.10.0-35-generic
linux-image-extra-4.10.0-37-generic linux-image-extra-4.10.0-40-generic
linux-image-extra-4.10.0-42-generic linux-image-extra-4.13.0-26-generic
linux-signed-image-4.10.0-35-generic linux-signed-image-4.10.0-37-generic
linux-signed-image-4.10.0-40-generic linux-signed-image-4.10.0-42-generic
linux-signed-image-4.13.0-26-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-image-4.13.0-36-generic
Suggested packages:
fdutils linux-tools
The following NEW packages will be installed:
linux-image-4.13.0-36-generic
0 upgraded, 1 newly installed, 0 to remove and 110 not upgraded.
78 not fully installed or removed.
Need to get 0 B/21.0 MB of archives.
After this operation, 72.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 452182 files and directories currently installed.)
Preparing to unpack .../linux-image-4.13.0-36-generic_4.13.0-36.40~16.04.1_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.13.0-36-generic /boot/vmlinuz-4.13.0-36-generic
Done.
Unpacking linux-image-4.13.0-36-generic (4.13.0-36.40~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.13.0-36-generic_4.13.0-36.40~16.04.1_amd64.deb (--unpack):
cannot copy extracted data for './boot/System.map-4.13.0-36-generic' to '/boot/System.map-4.13.0-36-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.13.0-36-generic /boot/vmlinuz-4.13.0-36-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-36-generic /boot/vmlinuz-4.13.0-36-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.13.0-36- generic_4.13.0-36.40~16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
답변1
공간이 부족하므로 apt가 실행되지 않습니다. 따라서 자동 수정도 실패합니다. /boot/ 디렉터리의 일부 공간을 수동으로 확보해야 합니다. 이를 수행하는 한 가지 방법은 제거하려는 커널에 대한 시스템 맵을 삭제하는 것입니다. 공간이 충분하지 않으면 일부 커널에 대한 initrd를 삭제하십시오. 참고: /boot/에 있는 파일을 제거하려면 루트 권한이 필요합니다.