你好,我可能需要一些帮助来升级虚拟服务器上的 Ubuntu,它似乎升级到了 18,但是存在一些依赖错误,并且在终端中找不到任何重启命令。
“Apt-get -f install” 没有帮助,只是给出关于未满足依赖关系的相同错误。
自动清理依赖项是否会删除其他程序使用的内容?这让我不想尝试。
我还担心如果 Ubuntu 无法启动,我将不得不删除它并丢失数据。
根据要求,以下是一些详细信息:
电力供应协议
我认为没有,但不确定如何检查,也许您请求的文件会显示,它们在下面。
Ubuntu 版本:Ubuntu 18.04.3 LTS(GNU/Linux 3.13.0-170-通用 x86_64)
sudo apt 更新
Hit:1 http://ie.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ie.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://ie.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_IE:en",
LC_ALL = (unset),
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
keys on reference is experimental at /usr/bin/apt-show-versions line 264.
keys on reference is experimental at /usr/bin/apt-show-versions line 359.
Reading package lists... Done
Building dependency tree
Reading state information... Done
1565 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo apt 升级 (显示我所说的在各种情况/命令中出现的错误)
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
console-setup : Depends: keyboard-configuration (= 1.108ubuntu15.5) but 1.178ubuntu2.9 is installed
console-setup-linux : Depends: keyboard-configuration (= 1.108ubuntu15.5) but 1.178ubuntu2.9 is installed
indicator-datetime : Depends: systemd or
systemd-shim but it is not installable
Recommends: unity-control-center (>= 14.04.3) but it is not installed or
ubuntu-system-settings but it is not installable
Recommends: ubuntu-touch-sounds but it is not installed
indicator-session : Depends: systemd-services
Recommends: unity-control-center-signon but it is not installable or
gnome-control-center-signon but it is not installable
initramfs-tools : Depends: initramfs-tools-core (= 0.122ubuntu8.16) but 0.130ubuntu3.9 is installed
libc-bin : Depends: libc6 (< 2.24) but 2.27-3ubuntu1 is installed
libc-dev-bin : Depends: libc6 (< 2.24) but 2.27-3ubuntu1 is installed
libc6-dbg : Depends: libc6 (= 2.23-0ubuntu11) but 2.27-3ubuntu1 is installed
libc6-dev : Depends: libc6 (= 2.23-0ubuntu11) but 2.27-3ubuntu1 is installed
libpam-systemd : Depends: systemd (= 237-3ubuntu10.33)
locales : Depends: libc-bin (> 2.27)
systemd-sysv : PreDepends: systemd
ubuntu-desktop : Depends: gdm3 but it is not installed
Depends: gnome-shell but it is not installed
Depends: gnome-shell-extension-appindicator but it is not installed
Depends: gnome-shell-extension-ubuntu-dock but it is not installed
Depends: gstreamer1.0-packagekit but it is not installed
Depends: libu2f-udev but it is not installed
Depends: spice-vdagent but it is not installed
Recommends: dirmngr
Recommends: fonts-indic but it is not installed
Recommends: fonts-noto-cjk but it is not installed
Recommends: fonts-noto-color-emoji but it is not installed
Recommends: fonts-ubuntu but it is not installed
Recommends: fwupd
Recommends: fwupdate
Recommends: fwupdate-signed
Recommends: gnome-calendar but it is not installed
Recommends: gnome-getting-started-docs but it is not installed
Recommends: gnome-initial-setup but it is not installed
Recommends: gnome-software-plugin-snap but it is not installed
Recommends: gnome-todo but it is not installed
Recommends: gpg-agent
Recommends: kerneloops but it is not installed
Recommends: libreoffice-style-breeze but it is not installed
Recommends: network-manager-config-connectivity-ubuntu but it is not installed
Recommends: orca but it is not installed
Recommends: packagekit
Recommends: printer-driver-brlaser but it is not installed
Recommends: printer-driver-m2300w but it is not installed
Recommends: snapd but it is not installed
Recommends: system-config-printer but it is not installed
Recommends: ubuntu-report but it is not installed
Recommends: ubuntu-software but it is not installed
Recommends: ubuntu-web-launchers but it is not installed
Recommends: xdg-desktop-portal-gtk
E: Unmet dependencies. Try using -f.
sudo apt-get -f 安装 (大部分错误相同,但最终却有所不同)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
/etc/apt/sources.list
#
# deb cdrom:[Ubuntu-Server 12.04 LTS _Precise Pangolin_ - Release amd64 (20120424.1)]/ dists/precise/ma$
# deb cdrom:[Ubuntu-Server 12.04 LTS _Precise Pangolin_ - Release amd64 (20120424.1)]/ dists/precise/re$
# deb cdrom:[Ubuntu-Server 12.04 LTS _Precise Pangolin_ - Release amd64 (20120424.1)]/ precise main res$
# deb cdrom:[Ubuntu-Server 12.04 LTS _Precise Pangolin_ - Release amd64 (20120424.1)]/ dists/precise/ma$
# deb cdrom:[Ubuntu-Server 12.04 LTS _Precise Pangolin_ - Release amd64 (20120424.1)]/ dists/precise/re$
# deb cdrom:[Ubuntu-Server 12.04 LTS _Precise Pangolin_ - Release amd64 (20120424.1)]/ precise main res$
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ie.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ie.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ie.archive.ubuntu.com/ubuntu/ bionic universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ bionic universe
deb http://ie.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ie.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://ie.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
deb http://ie.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
/etc/apt/sources.d 我在文件夹 /etc/apt 中没有看到此文件但是有:
来源列表.d- 里面有一些小文件:
boundary.list
boundary.list.distUpgrade
ubuntu-esm-infra-trusty.list
ubuntu-esm-infra-trusty.list.distUpgrade
其他信息:
sudo dpkg--configure-a
dpkg: dependency problems prevent configuration of console-setup:
console-setup depends on keyboard-configuration (= 1.108ubuntu15.5); however:
Version of keyboard-configuration on system is 1.178ubuntu2.9.
dpkg: error processing package console-setup (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
libpam-systemd:amd64 depends on systemd (= 237-3ubuntu10.33); however:
Package systemd is not installed.
dpkg: error processing package libpam-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-bluetooth:
gnome-bluetooth depends on libpam-systemd; however:
Package libpam-systemd:amd64 is not configured yet.
dpkg: error processing package gnome-bluetooth (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
ubuntu-desktop depends on gdm3; however:
Package gdm3 is not installed.
ubuntu-desktop depends on gnome-shell; however:
Package gnome-shell is not installed.
ubuntu-desktop depends on gnome-shell-extension-appindicator; however:
Package gnome-shell-extension-appindicator is not installed.
ubuntu-desktop depends on gnome-shell-extension-ubuntu-dock; however:
Package gnome-shell-extension-ubuntu-dock is not installed.
ubuntu-desktop depends on gstreamer1.0-packagekit; however:
Package gstreamer1.0-packagekit is not installed.
ubuntu-desktop depends on libu2f-udev; however:
Package libu2f-udev is not installed.
ubuntu-desktop depends on spice-vdagent; however:
Package spice-vdagent is not installed.
dpkg: error processing package ubuntu-desktop (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of console-setup-linux:
console-setup-linux depends on keyboard-configuration (= 1.108ubuntu15.5); however:
Version of keyboard-configuration on system is 1.178ubuntu2.9.
dpkg: error processing package console-setup-linux (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of locales:
locales depends on libc-bin (>> 2.27); however:
Version of libc-bin on system is 2.23-0ubuntu11.
dpkg: error processing package locales (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-settings-daemon:
gnome-settings-daemon depends on libpam-systemd; however:
Package libpam-systemd:amd64 is not configured yet.
dpkg: error processing package gnome-settings-daemon (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-control-center:
gnome-control-center depends on gnome-settings-daemon (>= 3.13.91); however:
Package gnome-settings-daemon is not configured yet.
dpkg: error processing package gnome-control-center (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for initramfs-tools:
initramfs-tools depends on initramfs-tools-core (= 0.122ubuntu8.16); however:
Version of initramfs-tools-core on system is 0.130ubuntu3.9.
dpkg: error processing package initramfs-tools (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent processing triggers for libc-bin:
libc-bin depends on libc6 (<< 2.24); however:
Version of libc6:amd64 on system is 2.27-3ubuntu1.
dpkg: error processing package libc-bin (--configure):
dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
console-setup
libpam-systemd:amd64
gnome-bluetooth
ubuntu-desktop
console-setup-linux
locales
gnome-settings-daemon
gnome-control-center
initramfs-tools
libc-bin
答案1
信用:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758287
编辑文件:/usr/bin/apt-show-versions
修补文件如下所示:
用。。。来代替foreach my $arch (keys $href->{$pkg}) {
: foreach my $arch (keys %{$href->{$pkg}}) {
用。。。来代替foreach my $arch ($archname or sort keys $pkgs->{$pkgname}) {
: foreach my $arch ($archname or sort keys %{$pkgs->{$pkgname}}) {
完毕