共計(jì) 5827 個字符,預(yù)計(jì)需要花費(fèi) 15 分鐘才能閱讀完成。
這篇文章主要介紹“Ubuntu 更新系統(tǒng)內(nèi)核出錯后的問題怎么解決”,在日常操作中,相信很多人在 Ubuntu 更新系統(tǒng)內(nèi)核出錯后的問題怎么解決問題上存在疑惑,丸趣 TV 小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”Ubuntu 更新系統(tǒng)內(nèi)核出錯后的問題怎么解決”的疑惑有所幫助!接下來,請跟著丸趣 TV 小編一起來學(xué)習(xí)吧!
因?yàn)橐碌能浖容^多,需要花費(fèi)挺長時間,也沒怎么在意,只是在運(yùn)行結(jié)束后看了一下報錯,上面顯示因?yàn)?boot 分區(qū)空間不夠,升級 linux 內(nèi)核的時候出錯了:
在處理時有錯誤發(fā)生:linux-image-extra-4.4.0-97-generic
linux-image-generic
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
之前也發(fā)生了同樣的問題,系統(tǒng)提示可以運(yùn)行 sudo apt-get autoremove 清除不需要的依賴的,而多次升級后 /boot 分區(qū)里已經(jīng)有了多個之前版本的 Linux 內(nèi)核,因此丸趣 TV 決定先運(yùn)行一下這個命令,看能不能自動給 /boot 分區(qū)清理出一部分空間來,這樣也省得我再查文檔手動清除舊的內(nèi)核文件了。實(shí)驗(yàn)證明這個命令真的有效果,/boot 分區(qū)清理出了 100 多 M 的空間,應(yīng)該也夠安裝新的內(nèi)核了。
再次執(zhí)行 sudo apt update/sudo apt upgrade, 系統(tǒng)并沒有接著安裝上次沒有完成安裝的內(nèi)核,而是報錯如下:
davidbro@Workstation:~$ sudo apt upgrade
正在讀取軟件包列表... 完成
正在分析軟件包的依賴關(guān)系樹
正在讀取狀態(tài)信息... 完成
正在計(jì)算更新... 完成
有一些軟件包無法被安裝。如果您用的是 unstable 發(fā)行版,這也許是
因?yàn)橄到y(tǒng)無法達(dá)到您要求的狀態(tài)造成的。該版本中可能會有一些您需要的軟件
包尚未被創(chuàng)建或是它們已被從新到 (Incoming) 目錄移出。下列信息可能會對解決問題有所幫助:下列軟件包有未滿足的依賴關(guān)系: linux-image-extra-4.4.0-96-generic : 依賴: linux-image-4.4.0-96-generic 但是它將不會被安裝
E: 破損的軟件包
試一下 sudo apt install 命令看看不能能安裝:
david@KingChef-Workstation:~$ sudo apt-get install
正在讀取軟件包列表... 完成
正在分析軟件包的依賴關(guān)系樹
正在讀取狀態(tài)信息... 完成
下列軟件包將被【卸載】: linux-image-extra-4.4.0-96-generic
升級了 0 個軟件包,新安裝了 0 個軟件包,要卸載 1 個軟件包,有 0 個軟件包未被升級。有 5 個軟件包沒有被完全安裝或卸載。解壓縮后將會空出 153 MB 的空間。您希望繼續(xù)執(zhí)行嗎? [Y/n] Y
(正在讀取數(shù)據(jù)庫 ... 系統(tǒng)當(dāng)前共安裝有 356556 個文件和目錄。)
正在卸載 linux-image-extra-4.4.0-96-generic (4.4.0-96.119) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-96-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
Error! Your kernel headers for kernel 4.4.0-96-generic cannot be found.
Please install the linux-headers-4.4.0-96-generic package,
or use the --kernelsourcedir option to tell DKMS where it s located
Error! Your kernel headers for kernel 4.4.0-96-generic cannot be found.
Please install the linux-headers-4.4.0-96-generic package,
or use the --kernelsourcedir option to tell DKMS where it s located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-96-generic
WARNING: missing /lib/modules/4.4.0-96-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-96-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_pkdOqR/lib/modules/4.4.0-96-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_pkdOqR/lib/modules/4.4.0-96-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-130-generic
Found initrd image: /boot/initrd.img-4.4.0-130-generic
Found linux image: /boot/vmlinuz-4.4.0-98-generic
Found initrd image: /boot/initrd.img-4.4.0-98-generic
Found linux image: /boot/vmlinuz-3.5.0-54-generic
Found initrd image: /boot/initrd.img-3.5.0-54-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
正在設(shè)置 initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: deferring update (trigger activated)
正在設(shè)置 linux-image-extra-4.4.0-130-generic (4.4.0-130.156) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
ERROR: Cannot create report: [Errno 17] File exists: /var/crash/i915-4.6.3-4.4.0-dkms.0.crash
Error! Bad return status for module build on kernel: 4.4.0-130-generic (x86_64)
Consult /var/lib/dkms/i915-4.6.3-4.4.0/1/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-130-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-130-generic /boot/vmlinuz-4.4.0-130-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-130-generic
Found initrd image: /boot/initrd.img-4.4.0-130-generic
Found linux image: /boot/vmlinuz-4.4.0-98-generic
Found initrd image: /boot/initrd.img-4.4.0-98-generic
Found linux image: /boot/vmlinuz-3.5.0-54-generic
Found initrd image: /boot/initrd.img-3.5.0-54-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
正在設(shè)置 linux-image-generic (4.4.0.130.136) ...
正在設(shè)置 linux-generic (4.4.0.130.136) ...
正在處理用于 initramfs-tools (0.122ubuntu8.11) 的觸發(fā)器 ...
update-initramfs: Generating /boot/initrd.img-4.4.0-130-generic
這樣最新的內(nèi)核版本 4.4.0.130.136 就安裝好了。其實(shí)我覺得這樣用 autoremove 騰出分區(qū)空間還是有點(diǎn)風(fēng)險的, 有可能會誤刪掉其他有用的軟件。
到此,關(guān)于“Ubuntu 更新系統(tǒng)內(nèi)核出錯后的問題怎么解決”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注丸趣 TV 網(wǎng)站,丸趣 TV 小編會繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!