Ubuntu更新系统内核出错后的问题怎么解决
这篇文章主要介绍“Ubuntu更新系统内核出错后的问题怎么解决”,在日常操作中,相信很多人在Ubuntu更新系统内核出错后的问题怎么解决问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Ubuntu更新系统内核出错后的问题怎么解决”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
创新互联建站专注为客户提供全方位的互联网综合服务,包含不限于网站设计、网站制作、晋安网络推广、微信小程序开发、晋安网络营销、晋安企业策划、晋安品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;创新互联建站为所有大学生创业者提供晋安建站搭建服务,24小时服务热线:13518219792,官方网址:www.cdcxhl.com
因为要更新的软件比较多,需要花费挺长时间,也没怎么在意,只是在运行结束后看了一下报错,上面显示因为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更新系统内核出错后的问题怎么解决”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!
新闻名称:Ubuntu更新系统内核出错后的问题怎么解决
转载注明:http://ybzwz.com/article/jsshcd.html