我不小心卸载了基础文件

我不小心卸载了基础文件

我意外卸载了 base-files。卸载后,我一直遇到nginx启动和apt依赖问题dpkg

我用来删除它的命令是

apt remove base-files

我尝试使用以下命令来解决它:

apt install base-files(failed)
reboot(failed)

我使用 Ubuntu 20.04 LTS 作为操作系统。
我使用 VPS(Sakura VPS)。

sudo dpkg--configure-a

...
dpkg: error processing package avahi-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-yaml:
 python3-yaml depends on python3 (<< 3.9); however:
  Package python3 is not configured yet.
 python3-yaml depends on python3 (>= 3.8~); however:
  Package python3 is not configured yet.
 python3-yaml depends on python3:any; however:
  Package python3 is not configured yet.

dpkg: error processing package python3-yaml (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3
 netplan.io
 python3-netifaces
 avahi-daemon
 ubuntu-advantage-tools
 lsb-release
 libnss-mdns:amd64
 python3-pkg-resources
 ubuntu-minimal
 avahi-utils
 python3-yaml

apt install -f --重新安装 ubuntu-minimal apt install --重新安装 ubuntu-minimal

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  accountsservice alsa-topology-conf alsa-ucm-conf apg apport-symptoms
  aptdaemon-data avahi-utils bluez bolt bubblewrap cheese-common
  cracklib-runtime cups-pk-helper dconf-cli desktop-file-utils docbook-xml
  enchant-2 evolution-data-server evolution-data-server-common fprintd
  geoclue-2.0 gir1.2-accountsservice-1.0 gir1.2-atk-1.0 gir1.2-atspi-2.0
  gir1.2-freedesktop gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdesktopenums-3.0
  gir1.2-gdkpixbuf-2.0 gir1.2-gdm-1.0 gir1.2-geoclue-2.0 gir1.2-glib-2.0
  gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0 gir1.2-graphene-1.0
  gir1.2-gtk-3.0 gir1.2-gweather-3.0 gir1.2-ibus-1.0 gir1.2-json-1.0
  gir1.2-mutter-6 gir1.2-nm-1.0 gir1.2-nma-1.0 gir1.2-notify-0.7
  gir1.2-packagekitglib-1.0 gir1.2-pango-1.0 gir1.2-polkit-1.0 gir1.2-rsvg-2.0
  gir1.2-secret-1 gir1.2-soup-2.4 gir1.2-upowerglib-1.0 gir1.2-vte-2.91 gjs
  gkbd-capplet gnome-control-center-data gnome-control-center-faces
  gnome-desktop3-data gnome-keyring gnome-keyring-pkcs11 gnome-session-bin
  gnome-session-common gnome-settings-daemon gnome-settings-daemon-common
  gnome-shell-common gnome-startup-applications gstreamer1.0-clutter-3.0
  gstreamer1.0-gl gstreamer1.0-plugins-base gstreamer1.0-plugins-good
  gstreamer1.0-pulseaudio gstreamer1.0-x ibus-data ibus-gtk ibus-gtk3
  ieee-data iio-sensor-proxy im-config ippusbxd iso-codes libaa1
  libaccountsservice0 libappindicator3-1 libappstream4 libarchive13 libasound2
  libasound2-data libasound2-plugins libasyncns0 libavahi-glib1 libavc1394-0
  libboost-thread1.71.0 libcaca0 libcamel-1.2-62 libcanberra-gtk3-0
  libcanberra-gtk3-module libcanberra-pulse libcanberra0 libcbor0.6
  libcdparanoia0 libcheese-gtk25 libcheese8 libclutter-1.0-0
  libclutter-1.0-common libclutter-gst-3.0-0 libclutter-gtk-1.0-0
  libcogl-common libcogl-pango20 libcogl-path20 libcogl20 libcolord-gtk1
  libcommon-sense-perl libcrack2 libdbusmenu-glib4 libdbusmenu-gtk3-4
  libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1
  libdrm2 libdv4 libebackend-1.2-10 libebook-1.2-20 libebook-contacts-1.2-3
  libecal-2.0-1 libedata-book-1.2-26 libedata-cal-2.0-1 libedataserver-1.2-24
  libedataserverui-1.2-2 libegl-mesa0 libegl1 libenchant-2-2 libevdev2
  libfido2-1 libflac8 libfontenc1 libfprint-2-2 libgail-common libgail18
  libgbm1 libgdata-common libgdata22 libgdm1 libgee-0.8-2 libgeoclue-2-0
  libgeocode-glib0 libgirepository-1.0-1 libgjs0g libgl1 libgl1-mesa-dri
  libglapi-mesa libgles2 libglib2.0-bin libglvnd0 libglx-mesa0 libglx0
  libgnome-autoar-0-0 libgnome-bluetooth13 libgnome-desktop-3-19
  libgnomekbd-common libgnomekbd8 libgoa-1.0-0b libgoa-1.0-common
  libgoa-backend-1.0-1 libgraphene-1.0-0 libgsound0 libgssdp-1.2-0
  libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0
  libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgtk2.0-0 libgtk2.0-bin
  libgtk2.0-common libgtop-2.0-11 libgtop2-common libgupnp-1.2-0
  libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 libgweather-3-16 libgweather-common
  libharfbuzz-icu0 libhyphen0 libibus-1.0-5 libical3 libice6 libiec61883-0
  libimobiledevice6 libinput-bin libinput10 libjack-jackd2-0
  libjavascriptcoregtk-4.0-18 libjson-perl libjson-xs-perl libkkc-common
  libkkc-data libkkc2 libldb2 libllvm11 libllvm9 libmarisa0 libmediaart-2.0-0
  libmozjs-68-0 libmp3lame0 libmpg123-0 libmtdev1 libmutter-6-0 libnma0
  libnotify4 libnspr4 libnss3 libogg0 libopus0 liborc-0.4-0
  libpackagekit-glib2-18 libpam-fprintd libpam-gnome-keyring libpangoxft-1.0-0
  libpciaccess0 libphonenumber7 libplist3 libpq5 libprotobuf17
  libpulse-mainloop-glib0 libpulse0 libpulsedsp libpwquality-common
  libpwquality1 libraw1394-11 librygel-core-2.6-2 librygel-db-2.6-2
  librygel-renderer-2.6-2 librygel-server-2.6-2 libsamplerate0 libsbc1
  libshout3 libsm6 libsnapd-glib1 libsndfile1 libsoxr0 libspeex1 libspeexdsp1
  libstartup-notification0 libstemmer0d libtag1v5 libtag1v5-vanilla libtalloc2
  libtdb1 libtevent0 libtheora0 libtwolame0 libtypes-serialiser-perl
  libudisks2-0 libunwind8 libupower-glib3 libusbmuxd6 libv4l-0 libv4lconvert0
  libvisual-0.4-0 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx6
  libvte-2.91-0 libvte-2.91-common libvulkan1 libwacom-bin libwacom-common
  libwacom2 libwavpack1 libwayland-server0 libwbclient0 libwebkit2gtk-4.0-37
  libwebpdemux2 libwebrtc-audio-processing1 libwhoopsie-preferences0
  libwhoopsie0 libwoff1 libx11-xcb1 libxatracker2 libxaw7 libxcb-dri2-0
  libxcb-dri3-0 libxcb-glx0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1
  libxcb-present0 libxcb-randr0 libxcb-render-util0 libxcb-res0 libxcb-shape0
  libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xkb1 libxcb-xv0 libxfont2
  libxft2 libxkbcommon-x11-0 libxkbfile1 libxklavier16 libxmu6 libxmuu1
  libxshmfence1 libxss1 libxt6 libxv1 libxvmc1 libxxf86vm1 libyelp0 mattermost
  mesa-vulkan-drivers mobile-broadband-provider-info mousetweaks mutter
  mutter-common network-manager-gnome openssh-client p11-kit p11-kit-modules
  packagekit packagekit-tools pgdg-keyring policykit-1-gnome postgresql-13
  postgresql-client-13 postgresql-client-common postgresql-common pulseaudio
  pulseaudio-module-bluetooth pulseaudio-utils python-apt-common rtkit rygel
  session-migration sgml-base sgml-data skkdic skkdic-extra
  sound-theme-freedesktop ssl-cert switcheroo-control sysstat
  ubuntu-wallpapers ubuntu-wallpapers-focal unzip upower usbmuxd
  whoopsie-preferences x11-xkb-utils x11-xserver-utils xauth xdg-dbus-proxy
  xfonts-base xfonts-encodings xfonts-utils xml-core xserver-common
  xserver-xephyr xserver-xorg-core xserver-xorg-input-all
  xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-legacy
  xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati
  xserver-xorg-video-fbdev xserver-xorg-video-intel xserver-xorg-video-nouveau
  xserver-xorg-video-qxl xserver-xorg-video-radeon xserver-xorg-video-vesa
  xserver-xorg-video-vmware xwayland yaru-theme-gnome-shell yelp-xsl zenity
  zenity-common
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
11 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for ubuntu-minimal:amd64

答案1

您可能需要重新安装一些ubuntu-minimal软件包来解决这些问题:

sudo apt install --reinstall ubuntu-minimal

如果有报错,apt -f可能dpkg有帮助:

sudo apt install -f
sudo dpkg --configure -a

然后,一旦完成,运行升级以确保一切就绪:

sudo apt-get dist-upgrade

如果您继续看到错误,请编辑您的问题并包含命令和错误的复制/粘贴。

答案2

在 Linux 中调查时,我发现一个程序会自动进行备份。
这是我很久以前设置的。
我忘了它。
我恢复了备份。
解决了。

相关内容