我不知怎么搞乱了包管理和依赖关系

我不知怎么搞乱了包管理和依赖关系

可能是我尝试运行旧安装程序时弄错了什么。当我尝试在 Ubuntu 22.04 上安装 steam 时,发生了以下情况:

$ sudo apt install steam
[sudo] password for user: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apt : Depends: libapt-pkg6.0 (>= 2.4.7) but it is not going to be installed
 init : PreDepends: systemd-sysv
 libqt5gui5 : Depends: libegl1 but it is not going to be installed
              Depends: libgl1 but it is not going to be installed
              Depends: libinput10 (>= 0.15.0) but it is not going to be installed
              Depends: libudev1 (>= 183) but it is not installable
              Recommends: libqt5svg5 but it is not going to be installed
              Recommends: qt5-gtk-platformtheme but it is not going to be installed
 shim-signed : Depends: grub-efi-amd64-signed but it is not going to be installed or
                        grub-efi-arm64-signed but it is not installable
               Depends: grub2-common (>= 2.04-1ubuntu24)
 util-linux : PreDepends: libudev1 (>= 183) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

每当我尝试安装任何东西时都会发生这种情况。

我已经尝试过update/ upgrade, dist-upgrade, reinstall, fix-broken, ... 但没有成功。

并且apt-mark showhold不返回任何内容。

有任何想法吗?

谢谢你!


/etc/apt/sources.list

# deb cdrom:[Ubuntu 22.04.1 LTS _Jammy Jellyfish_ - Release amd64 (20220809.1)]/ jammy main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ jammy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://de.archive.ubuntu.com/ubuntu/ jammy-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://de.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ jammy-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://de.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ jammy-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
## or updates from the Ubuntu security team.
# deb-src http://de.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu jammy-security restricted main
# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

/etc/apt/sources.list.d 中的 .list 文件

google-chrome.list                      mozillateam-ubuntu-ppa-jammy.list        spotify.list.save
google-chrome.list.save                 mozillateam-ubuntu-ppa-jammy.list.save   ubuntu-mozilla-security-ubuntu-ppa-jammy.list
graphics-drivers-ubuntu-ppa-jammy.list  obsproject-ubuntu-obs-studio-jammy.list  ubuntu-mozilla-security-ubuntu-ppa-jammy.list.save
mint-una.list                           signal-xenial.list
mint-una.list.save                      spotify.list

$ sudo apt install apt init libqt5gui5 libegl1 libgl1 libudev1 libqt5svg5 qt5-gtk-platformtheme  shim-signed grub2-common util-linux
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
grub2-common is already the newest version (2.06-2ubuntu7).
init is already the newest version (1.62).
libegl1 is already the newest version (1.4.0-1).
libegl1 set to manually installed.
libgl1 is already the newest version (1.4.0-1).
libgl1 set to manually installed.
shim-signed is already the newest version (1.51+15.4-0ubuntu9).
util-linux is already the newest version (2.37.2-4ubuntu3).
util-linux set to manually installed.
libqt5svg5 is already the newest version (5.15.3-1).
libqt5svg5 set to manually installed.
apt is already the newest version (2.4.7).
apt set to manually installed.
libqt5gui5 is already the newest version (5.15.3+dfsg-2ubuntu0.1).
libqt5gui5 set to manually installed.
libudev1 is already the newest version (249.11-0ubuntu3.4).
libudev1 set to manually installed.
qt5-gtk-platformtheme is already the newest version (5.15.3+dfsg-2ubuntu0.1).
qt5-gtk-platformtheme set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt update
Hit:1 http://de.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://repository.spotify.com stable InRelease                                                                                                      
Hit:3 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu jammy InRelease                                                                        
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease                                                                    
Hit:5 https://updates.signal.org/desktop/apt xenial InRelease       
Get:6 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]            
Hit:7 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy InRelease                  
Hit:8 https://ppa.launchpadcontent.net/obsproject/obs-studio/ubuntu jammy InRelease              
Hit:9 https://ppa.launchpadcontent.net/ubuntu-mozilla-security/ppa/ubuntu jammy InRelease        
Fetched 110 kB in 1s (113 kB/s)                                
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

apt-cache policy libapt-pkg6.0
libapt-pkg6.0:
  Installed: 2.4.7
  Candidate: 2.4.7
  Version table:
 *** 2.4.7 100
        100 /var/lib/dpkg/status
     2.4.5 500
        500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

答案1

您的sources.list注释掉jammy-updates了或缺失了。这就是某些软件包无法安装的原因。

2.4.8 更新libapt-pkg6.0位于jammy-updates/main,其中有一些注释掉或丢失的行sources.list

您至少应该具备这一点。

deb http://de.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse

相关内容