我在英特尔 NUC 下的实时 USB 上使用 Ubuntu 16.04。我使用 YUMI 创建了实时 USB,并且 USB 上还有其他 SO 可用。
当我启动 USB 时,出现一个弹出错误,提示initramfs-tools 0.122ubuntu8.1 has problems
。当我尝试升级时,出现以下错误
Removing plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
cp: cannot create regular file '/cdrom/casper/initrd.gz.new': No such file or directory
dpkg: error processing package plymouth-theme-ubuntu-text (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
plymouth-theme-ubuntu-text
E: Sub-process /usr/bin/dpkg returned an error code (1)
因此我尝试apt-get -f install
:
root@ubuntu:/home/ubuntu# sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-rb-3.0 gir1.2-secret-1 gir1.2-udisks-2.0 gnome-video-effects
guile-2.0-libs libandroid-properties1 libdmapsharing-3.0-2 libevent-2.0-5
libgc1c2 libgpod-common libgpod4 libnatpmp1 liboxideqt-qmlplugin
liboxideqtcore0 liboxideqtquick0 libqqwing2v5 libqt5positioning5
librhythmbox-core9 libsgutils2-2 media-player-info oxideqt-codecs
python3-brlapi python3-louis python3-mako python3-pyatspi python3-speechd
qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
qml-module-ubuntu-onlineaccounts qml-module-ubuntu-web
qtdeclarative5-accounts-plugin qtdeclarative5-qtquick2-plugin rhythmbox-data
signon-keyring-extension syslinux syslinux-common syslinux-legacy
transmission-common unity-webapps-qml usb-creator-common xbrlapi
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
plymouth-theme-ubuntu-text
0 upgraded, 0 newly installed, 1 to remove and 335 not upgraded.
12 not fully installed or removed.
After this operation, 53.2 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 218095 files and directories currently installed.)
Removing plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
cp: cannot create regular file '/cdrom/casper/initrd.gz.new': No such file or directory
dpkg: error processing package plymouth-theme-ubuntu-text (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
plymouth-theme-ubuntu-text
E: Sub-process /usr/bin/dpkg returned an error code (1)
Autoremove
也没有解决任何问题。没有依赖关系问题,所以我找到的所有 askubuntu 问题都无法解决我的问题。我在 launchpad 上找到了这个链接https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1278330
当我尝试移除它时
root@ubuntu:/home/ubuntu# apt-get remove --purge plymouth-theme-ubuntu-text
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-rb-3.0 gir1.2-secret-1 gir1.2-udisks-2.0 gnome-video-effects
guile-2.0-libs libandroid-properties1 libdmapsharing-3.0-2 libevent-2.0-5
libgc1c2 libgpod-common libgpod4 libnatpmp1 liboxideqt-qmlplugin
liboxideqtcore0 liboxideqtquick0 libqqwing2v5 libqt5positioning5
librhythmbox-core9 libsgutils2-2 media-player-info oxideqt-codecs
python3-brlapi python3-louis python3-mako python3-pyatspi python3-speechd
qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
qml-module-ubuntu-onlineaccounts qml-module-ubuntu-web
qtdeclarative5-accounts-plugin qtdeclarative5-qtquick2-plugin rhythmbox-data
signon-keyring-extension syslinux syslinux-common syslinux-legacy
transmission-common unity-webapps-qml usb-creator-common xbrlapi
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
plymouth-theme-ubuntu-text*
0 upgraded, 0 newly installed, 1 to remove and 335 not upgraded.
12 not fully installed or removed.
After this operation, 53.2 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 218100 files and directories currently installed.)
Removing plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
cp: cannot create regular file '/cdrom/casper/initrd.gz.new': No such file or directory
dpkg: error processing package plymouth-theme-ubuntu-text (--purge):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
plymouth-theme-ubuntu-text
E: Sub-process /usr/bin/dpkg returned an error code (1)
并重新安装
root@ubuntu:/home/ubuntu# sudo apt-get install plymouth-theme-ubuntu-text
Reading package lists... Done
Building dependency tree
Reading state information... Done
plymouth-theme-ubuntu-text is already the newest version (0.9.2-3ubuntu13.1).
The following packages were automatically installed and are no longer required:
gir1.2-rb-3.0 gir1.2-secret-1 gir1.2-udisks-2.0 gnome-video-effects
guile-2.0-libs libandroid-properties1 libdmapsharing-3.0-2 libevent-2.0-5
libgc1c2 libgpod-common libgpod4 libnatpmp1 liboxideqt-qmlplugin
liboxideqtcore0 liboxideqtquick0 libqqwing2v5 libqt5positioning5
librhythmbox-core9 libsgutils2-2 media-player-info oxideqt-codecs
python3-brlapi python3-louis python3-mako python3-pyatspi python3-speechd
qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
qml-module-ubuntu-onlineaccounts qml-module-ubuntu-web
qtdeclarative5-accounts-plugin qtdeclarative5-qtquick2-plugin rhythmbox-data
signon-keyring-extension syslinux syslinux-common syslinux-legacy
transmission-common unity-webapps-qml usb-creator-common xbrlapi
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 335 not upgraded.
12 not fully installed or removed.
Need to get 0 B/9,078 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up initramfs-tools (0.122ubuntu8) ...
update-initramfs: deferring update (trigger activated)
cp: cannot create regular file '/cdrom/casper/initrd.gz.new': No such file or directory
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of plymouth:
plymouth depends on initramfs-tools | dracut; however:
Package initramfs-tools is not configured yet.
Package dracut is not installed.
dpkg: error processing package plymouth (--configure):
dependency problems - leaving unconfigured
dpkg: error processing package plymouth-theme-ubuntu-text (--configure):
package plymouth-theme-ubuntu-text is not ready for configuration
cannot configure (current status 'half-installed')
No apport report written because the error message indicates its a followup error from a previous failure.`
` dpkg: dependency problems prevent configuration of linux-image-4.4.0-31-generic:
linux-image-4.4.0-31-generic depends on initramfs-tools | linux-initramfs-tool; however:
Package initramfs-tools is not configured yet.
Package linux-initramfs-tool is not installed.
Package initramfs-tools which provides linux-initramfs-tool is not configured yet.
dpkg: error processing package linux-image-4.4.0-31-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-31-generic:
linux-image-extra-4.4.0-31-generic depends on linux-image-4.4.0-31-generic; however:
Package linux-image-4.4.0-31-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.4.0-31-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-4.4.0-31-generic; however:
Package linux-image-4.4.0-31No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
-generic is not configured yet.
linux-image-generic depends on linux-image-extra-4.4.0-31-generic; however:
Package linux-image-extra-4.4.0-31-generic is not configured yet.
dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 4.4.0.31.33); however:
Package linux-image-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image-4.4.0-31-generic:
linux-signed-image-4.4.0-31-generic depends on linux-image-4.4.0-31-generic (= 4.4.0-31.50); however:
Package linux-image-4.4.0-31-generic is not configured yet.
dpkg: error processing package linux-signed-image-4.4.0-31-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configurNo apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
ation of linux-signed-image-generic:
linux-signed-image-generic depends on linux-signed-image-4.4.0-31-generic; however:
Package linux-signed-image-4.4.0-31-generic is not configured yet.
linux-signed-image-generic depends on linux-image-extra-4.4.0-31-generic; however:
Package linux-image-extra-4.4.0-31-generic is not configured yet.
dpkg: error processing package linux-signed-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic:
linux-signed-generic depends on linux-signed-image-generic (= 4.4.0.31.33); however:
Package linux-signed-image-generic is not configured yet.
dpkg: error processing package linux-signed-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of plymouth-label:
plymouth-label depends on plymouth (= 0.9.2-3ubuntu13.1); however:
Package plymouth is not configured yet.
dpkg: error processing package plymoNo apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
uth-label (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of plymouth-theme-ubuntu-logo:
plymouth-theme-ubuntu-logo depends on plymouth (= 0.9.2-3ubuntu13.1); however:
Package plymouth is not configured yet.
plymouth-theme-ubuntu-logo depends on plymouth-label (= 0.9.2-3ubuntu13.1); however:
Package plymouth-label is not configured yet.
dpkg: error processing package plymouth-theme-ubuntu-logo (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
initramfs-tools
plymouth
plymouth-theme-ubuntu-text
linux-image-4.4.0-31-generic
linux-image-extra-4.4.0-31-generic
linux-image-generic
linux-generic
linux-signed-image-4.4.0-31-generic
linux-signed-image-generic
linux-signed-generic
plymouth-label
plymouth-theme-ubuntu-logo
E: Sub-process /usr/bin/dpkg returned an error code (1)
有人知道该如何解决这个问题吗?
提前致谢
R.
答案1
经过一个月的研究,我发现了错误的原因。
我在 Live 状态下运行 Ubuntu,在运行后apt-get upgrade
,我的内核升级了,导致出现上述错误。为了修复错误并再次启用文件安装,我做了以下操作这可能会导致系统无法运行。
mkinitramfs - u
:这将创建一个 initramps img。update-initramfs - u
:更新图片- 现在运行
which update-initramfs
找到给出错误的配置文件 - 在配置文件中添加一个退出,这样您就不会收到错误代码。就我而言,在第 3 行我仅添加了 exit 0。
apt-get -f install
如果运气好的话,内核不会崩溃,问题就会得到解决。如果不是,您的系统就会死机,很抱歉。这不是解决方案,我们只是在脚本中添加了一个退出,这样我们就不会收到错误提示,并且我们能够安装软件包。
结论:除非您知道自己在做什么,否则永远不要升级实时系统。内核非常脆弱。
答案2
尝试:
- 再次运行 $ apt-get remove --purge plymouth-theme-ubuntu-text
- $ whereis plymouth-theme-ubuntu-text
- 手动删除与之相关的所有内容
- 重新安装 plymouth-theme-ubuntu-text
让我知道它是否对你有用,它在不同的情况下对我有用