删除破坏了我系统的 ghostscript 后,我安装了全新的 Ubuntu。每次我想安装某些东西时,都会收到以下警告:
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libfwupdplugin1
libgstreamer-plugins-bad1.0-0 libnvidia-cfg1-470 libnvidia-common-470
libnvidia-decode-470 libnvidia-encode-470 libnvidia-extra-470
libnvidia-fbc1-470 libnvidia-gl-470 libnvidia-ifr1-470 libx11-xcb1:i386
libxnvctrl0 linux-headers-5.13.0-30-generic linux-hwe-5.13-headers-5.13.0-30
linux-image-5.13.0-30-generic linux-modules-5.13.0-30-generic
linux-modules-extra-5.13.0-30-generic
linux-modules-nvidia-470-5.13.0-30-generic
linux-objects-nvidia-470-5.13.0-30-generic
linux-signatures-nvidia-5.13.0-30-generic nvidia-compute-utils-470
nvidia-prime nvidia-settings nvidia-utils-470 screen-resolution-extra
xserver-xorg-video-nvidia-470
我不知道为什么 Ubuntu 要删除与我的显卡 NVIDIA 相关的所有内容?这些软件包重要吗?我应该如何保存主题或关闭此警告?我以前也遇到过这个问题,删除ghostscript这个软件包删除了几乎所有我需要的核心软件包。现在我害怕删除它们。
答案1
看起来许多软件包都是作为依赖项安装的,不再需要。您可以手动安装要保留的软件包。
例如:
sudo apt update
sudo apt install chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libfwupdplugin1 libgstreamer-plugins-bad1.0-0 libnvidia-cfg1-470 libnvidia-common-470 libnvidia-decode-470 libnvidia-encode-470 libnvidia-extra-470 libnvidia-fbc1-470 libnvidia-gl-470 libnvidia-ifr1-470 libx11-xcb1:i386 libxnvctrl0 nvidia-compute-utils-470 nvidia-prime nvidia-settings nvidia-utils-470 screen-resolution-extra xserver-xorg-video-nvidia-470
这将明确安装除内核相关软件包之外的所有内容。当发布较新的内核版本时,内核相关软件包通常已过时。下次,消息应该只包含内核相关软件包,您可以安全地运行sudo apt autoremove
以删除它们。