![apt-get 升级时 Initramfs 错误](https://linux22.com/image/206626/apt-get%20%E5%8D%87%E7%BA%A7%E6%97%B6%20Initramfs%20%E9%94%99%E8%AF%AF.png)
每次进行 apt/apt-get 升级时都会出现错误。我在网上到处搜索解决方案但找不到任何东西
这是我得到的错误
代码:
apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
chromium chromium-common chromium-driver chromium-sandbox
impacket-scripts libavcodec58 libavfilter7 libavformat58 libavutil56
libheif1 libldb2 libpostproc55 libsmbclient libswresample3 libswscale5
libwbclient0 open-vm-tools open-vm-tools-desktop powershell-empire
python3-ldb python3-samba python3-sympy samba samba-common
samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules
smbclient winexe
The following packages will be upgraded:
apt apt-utils bash binutils binutils-common binutils-x86-64-linux-gnu
bubblewrap bulk-extractor cifs-utils clang-13 console-setup
console-setup-linux cpp-11 cron curl debianutils dnsrecon exploitdb
firebird3.0-common firebird3.0-common-doc firefox-esr firmware-zd1211
fuse3 g++-11 gcc-11 gcc-11-base gcc-12-base gcr gdal-data
gir1.2-gstreamer-1.0 gir1.2-gtk-3.0 gir1.2-handy-1
gir1.2-javascriptcoregtk-4.0 gir1.2-nm-1.0 gir1.2-notify-0.7
gir1.2-pango-1.0 gir1.2-webkit2-4.0 gnome-icon-theme gnome-keyring
gnome-keyring-pkcs11 gstreamer1.0-gl gstreamer1.0-libav
gstreamer1.0-plugins-bad gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-x gtk-update-icon-cache gvfs
gvfs-backends gvfs-common gvfs-daemons gvfs-fuse gvfs-libs
ibverbs-providers icu-devtools intel-microcode ipp-usb iptables john
john-data kali-defaults kali-defaults-desktop kali-desktop-base
kali-desktop-core kali-desktop-live kali-desktop-xfce kali-linux-core
kali-linux-default kali-linux-firmware kali-linux-headless kali-menu
kali-themes kali-themes-common kali-tools-top10 keyboard-configuration
legion lib32gcc-s1 lib32stdc++6 libaom3 libapache2-mod-php8.1
libappstream4 libapt-pkg6.0 libasan6 libass9 libatomic1 libbinutils
libblas3 libbluray2 libcaca0 libcc1-0 libcfitsio9
libcharon-extauth-plugins libclang-common-13-dev libclang-cpp13
libclang1-13 libctf-nobfd0 libctf0 libcups2 libcurl3-gnutls libcurl4
libdaxctl1 libdb5.3 libdebconfclient0 libdv4 libdw1 libelf1 libfbclient2
libfluidsynth3 libfreeaptx0 libfreetype6 libfuse3-3 libgcc-11-dev
libgcc-s1 libgck-1-0 libgcr-base-3-1 libgcr-ui-3-1 libgdal30 libgfortran5
libgomp1 libgphoto2-6 libgphoto2-l10n libgphoto2-port12
libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0
libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin
libgtk-3-common libgtk-4-1 libgtk-4-bin libgtk-4-common libhandy-1-0
libibverbs1 libicu-dev libicu71 libiec61883-0 libigdgmm12 libindi-data
libindidriver1 libip4tc2 libip6tc2 libitm1 libjavascriptcoregtk-4.0-18
liblapack3 libllvm13 liblsan0 libltdl7 libmbim-glib4 libmbim-proxy
libmm-glib0 libncurses-dev libncurses5 libncurses6 libncursesw6 libndctl6
libnghttp2-14 libnginx-mod-http-geoip libnginx-mod-http-image-filter
libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream
libnginx-mod-stream-geoip libnm0 libnotify-bin libnotify4 libntfs-3g89
libobjc-11-dev libobjc4 libodbc2 libodbcinst2 libpam-gnome-keyring
libpam-modules libpam-modules-bin libpam-runtime libpam0g libpango-1.0-0
libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libpcsclite1
libpipewire-0.3-0 libpipewire-0.3-common libpipewire-0.3-modules libpmem1
libpod-parser-perl libpq5 libqmi-glib5 libqmi-proxy libquadmath0
librdmacm1 libsdl2-2.0-0 libsnappy1v5 libsonic0 libspa-0.2-modules
libspeechd2 libsqlite3-0 libssl1.1 libstdc++-11-dev libstdc++6
libstrongswan libstrongswan-standard-plugins libtalloc2 libtdb1
libtevent0 libtiff5 libtinfo-dev libtinfo5 libtinfo6 libtsan0 libubsan1
libupower-glib3 libv4l-0 libv4lconvert0 libvisual-0.4-0 libvulkan1
libwebkit2gtk-4.0-37 libwebsockets16 libwireshark-data libwireshark15
libwiretap12 libwsutil13 libwww-mechanize-perl libwww-perl libxml2
libxml2-dev libxml2-utils libxtables12 linux-base llvm-13 llvm-13-dev
llvm-13-linker-tools llvm-13-runtime llvm-13-tools logrotate lsof
manpages manpages-dev media-types metasploit-framework mitmproxy
modemmanager nano ncurses-base ncurses-bin ncurses-term network-manager
network-manager-openconnect network-manager-openconnect-gnome nginx
nginx-common nginx-core ntfs-3g nvidia-modprobe
nvidia-tesla-470-alternative nvidia-tesla-470-kernel-support openssl orca
os-prober pcscd pdf-parser perl-openssl-defaults php8.1 php8.1-cli
php8.1-common php8.1-mysql php8.1-opcache php8.1-readline pipewire
pipewire-bin postgresql postgresql-14 postgresql-client-14
postgresql-client-common postgresql-common python-pastedeploy-tpl
python3-anyio python3-apispec python3-apscheduler python3-bleach
python3-blinker python3-bottle python3-cheroot python3-constantly
python3-debian python3-dicttoxml python3-django python3-dropbox
python3-feedparser python3-filelock python3-flasgger python3-flaskext.wtf
python3-future python3-gdal python3-humanize python3-hyperlink
python3-impacket python3-macholib python3-mako python3-markdown
python3-marshmallow-sqlalchemy python3-mechanize python3-mypy-extensions
python3-paste python3-pastedeploy python3-pastescript python3-pip
python3-pip-whl python3-platformdirs python3-psycopg2
python3-pyasn1-modules python3-pycurl python3-pyshp
python3-requests-toolbelt python3-rich python3-speechd python3-talloc
python3-tdb python3-traitlets python3-twisted python3-zope.deprecation
python3-zope.interface qemu-guest-agent rsyslog ruby-mini-portile2
ruby-nokogiri ruby-xmlrpc runit-helper shared-mime-info speech-dispatcher
speech-dispatcher-audio-plugins speech-dispatcher-espeak-ng spice-vdagent
sqlite3 sqlmap sslyze strongswan strongswan-charon strongswan-libcharon
strongswan-starter tango-icon-theme tcpdump tdb-tools tshark
unixodbc-common unrar upower usb.ids vim vim-common vim-runtime vim-tiny
vpnc vpnc-scripts wireshark wireshark-common wireshark-qt wordlists
wpasupplicant xdg-dbus-proxy xdg-desktop-portal xfce4-taskmanager xxd zsh
zsh-common
365 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
Need to get 769 MB of archives.
After this operation, 14.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
...
Installing new version of config file /etc/xdg/autostart/gnome-keyring-ssh.desktop ...
Created symlink /etc/systemd/user/graphical-session-pre.target.wants/gnome-keyring-daemon.service -> /usr/lib/systemd/user/gnome-keyring-daemon.service.
Created symlink /etc/systemd/user/sockets.target.wants/gnome-keyring-daemon.socket -> /usr/lib/systemd/user/gnome-keyring-daemon.socket.
Processing triggers for nvidia-tesla-470-alternative (470.129.06-3) ...
Setting up nvidia-tesla-470-kernel-support (470.129.06-3) ...
Processing triggers for php8.1-cli (8.1.5-1) ...
Processing triggers for libapache2-mod-php8.1 (8.1.5-1) ...
Processing triggers for libc-bin (2.33-6) ...
Processing triggers for glx-alternative-nvidia (1.2.1) ...
Processing triggers for glx-alternative-mesa (1.2.1) ...
Processing triggers for update-glx (1.2.1) ...
Processing triggers for libc-bin (2.33-6) ...
Processing triggers for glx-alternative-nvidia (1.2.1) ...
Processing triggers for libc-bin (2.33-6) ...
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
我使用的内核
代码:
Linux localhost 5.16.0-kali7-amd64 #1 SMP PREEMPT Debian 5.16.18-1kali1 (2022-04-01) x86_64 GNU/Linux
我的kali linux版本
代码:
lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2022.2
Codename: kali-rolling
有人能帮我吗?
谢谢
答案1
也许您的磁盘空间不足/boot
。apt-get autoremove
跑步前可以先尝试一下apt-get upgrade
。
从联机帮助页:
autoremove 用于删除为满足其他包的依赖关系而自动安装但现在不再需要的包。
这可能会有所帮助,因为它可以适当地删除旧内核的依赖关系,从而使 FS 变得混乱并阻止update-initramfs
操作的成功运行。