如何修复损坏的软件包依赖关系

如何修复损坏的软件包依赖关系

我有一个远程 Ubuntu 服务器。运行时apt install -f我收到以下消息:

sudo apt install -f
Reading package lists ... Done 
......
The following packages were installed automatically and are no longer required.:
  binutils distro-info-data emacsen-common fonts-dejavu-core foomatic-db grub-pc-bin kbd keyutils
  lib32gcc1 lib32ncurses5 lib32stdc++6 lib32tinfo5 libaspell15 libavahi-client3 libavahi-common-data
.....
  libsnmp-base libtiff5 libtirpc1 libwrap0 lockfile-progs mc-data mime-support p7zip xkb-data
To remove them, use «sudo apt autoremove».
Packages to be REMOVED:
  acpi-support-base acpid adduser anacron ansible apt apt-utils aptitude aspell aspell-en aspell-ru
  astra-extra astra-safepolicy astra-version atftp bash bash-completion blends-tasks bsd-mailx
  ca-certificates cdebconf:i386 chkrootkit console-setup console-setup-linux cron cryptsetup
.....
  logrotate logtail lsb-release man-db mc mime-construct mount myspell-ru ntfs-3g ntp openprinting-ppds
  openssh-client openssh-server openssh-sftp-server openssl:i386 p7zip-full p7zip-rar passwd:i386 perl
  perl-base perl-modules-5.24 perl-openssl-defaults poppler-data procps python python-cffi-backend
  python-crypto python-cryptography python-enum34 python-httplib2 python-idna python-ipaddress
  python-jinja2 python-kerberos python-markupsafe python-minimal python-netaddr python-paramiko
  python-pkg-resources python-pyasn1 python-selinux python-setuptools python-six python-xmltodict
  python-yaml python2.7 python3 python3-minimal python3.5 python3.5-minimal quota readline-common
  rsyslog snmp sudo systemd systemd-sysv sysvinit-utils tar:i386 tasksel tasksel-data tcl-expect tzdata
  ucf udev ufw util-linux util-linux-locales wamerican wget:i386 wpasupplicant
ATTENTION: These essential packages will be removed.
DO NOT do this if you DO NOT imagine all the possible consequences!
  apt adduser (вследствие apt) gnupg (вследствие apt)
  init-system-helpers (вследствие apt) bash dash (вследствие bash) dpkg:i386
  ia32-libs (вследствие dpkg:i386) tar:i386 (вследствие dpkg:i386) e2fsprogs
  libblkid1 (вследствие e2fsprogs) libuuid1 (вследствие e2fsprogs)
  util-linux (вследствие e2fsprogs) grep gzip init systemd-sysv (вследствие init)
  perl-base (вследствие init-system-helpers) login libpam0g (вследствие login)
  libpam-runtime (вследствие login) libpam-modules (вследствие login) mount
  libmount1 (вследствие mount) sysvinit-utils libfdisk1 (вследствие util-linux)
0 updated, 0 new packages installed, 227 packages marked for deletion, and 0 packages not updated.
not fully installed or removed 42 packages.
After this operation, the amount of occupied disk space will be reduced by 2 096 MB.
What you want to do can have undesirable consequences.
To continue, enter the phrase: “Yes, do as I say!”

我该如何修复此问题?

我认为有人安装了不兼容的软件包dpkg并破坏了一些依赖关系。

更新:在此服务器上,我m dont have any internet connection. I只能通过某些 vpn 在 ssh 上连接到它们。

答案1

您能否尝试以下操作:

  1. sudo dpkg --add-architecture i386
  2. sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
  3. sudo apt -f install

相关内容