您好,登錄后才能下訂單哦!
這篇文章主要介紹“Ubuntu更新系統內核出錯后的問題怎么解決”,在日常操作中,相信很多人在Ubuntu更新系統內核出錯后的問題怎么解決問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”Ubuntu更新系統內核出錯后的問題怎么解決”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
因為要更新的軟件比較多,需要花費挺長時間,也沒怎么在意,只是在運行結束后看了一下報錯,上面顯示因為boot分區空間不夠,升級linux內核的時候出錯了:
在處理時有錯誤發生: linux-image-extra-4.4.0-97-generic linux-image-generic linux-generic E: Sub-process /usr/bin/dpkg returned an error code (1)
之前也發生了同樣的問題,系統提示可以運行sudo apt-get autoremove清除不需要的依賴的,而多次升級后/boot分區里已經有了多個之前版本的Linux內核,因此億速云決定先運行一下這個命令,看能不能自動給/boot分區清理出一部分空間來,這樣也省得我再查文檔手動清除舊的內核文件了。實驗證明這個命令真的有效果,/boot分區清理出了100多M的空間,應該也夠安裝新的內核了。
再次執行sudo apt update/sudo apt upgrade, 系統并沒有接著安裝上次沒有完成安裝的內核,而是報錯如下:
davidbro@Workstation:~$ sudo apt upgrade 正在讀取軟件包列表... 完成 正在分析軟件包的依賴關系樹 正在讀取狀態信息... 完成 正在計算更新... 完成 有一些軟件包無法被安裝。如果您用的是 unstable 發行版,這也許是 因為系統無法達到您要求的狀態造成的。該版本中可能會有一些您需要的軟件 包尚未被創建或是它們已被從新到(Incoming)目錄移出。 下列信息可能會對解決問題有所幫助: 下列軟件包有未滿足的依賴關系: 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 正在讀取軟件包列表... 完成 正在分析軟件包的依賴關系樹 正在讀取狀態信息... 完成 下列軟件包將被【卸載】: linux-image-extra-4.4.0-96-generic 升級了 0 個軟件包,新安裝了 0 個軟件包,要卸載 1 個軟件包,有 0 個軟件包未被升級。 有 5 個軟件包沒有被完全安裝或卸載。 解壓縮后將會空出 153 MB 的空間。 您希望繼續執行嗎? [Y/n] Y (正在讀取數據庫 ... 系統當前共安裝有 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 done 正在設置 initramfs-tools (0.122ubuntu8.11) ... update-initramfs: deferring update (trigger activated) 正在設置 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 done 正在設置 linux-image-generic (4.4.0.130.136) ... 正在設置 linux-generic (4.4.0.130.136) ... 正在處理用于 initramfs-tools (0.122ubuntu8.11) 的觸發器 ... update-initramfs: Generating /boot/initrd.img-4.4.0-130-generic
這樣最新的內核版本4.4.0.130.136就安裝好了。其實我覺得這樣用autoremove騰出分區空間還是有點風險的,有可能會誤刪掉其他有用的軟件。
到此,關于“Ubuntu更新系統內核出錯后的問題怎么解決”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注億速云網站,小編會繼續努力為大家帶來更多實用的文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。