因此,我试图编译Aseprite,并且无法安装我在这个过程中需要的包: libx11-dev。以下是"sudo apt install libx11 11-dev“的输出
sudo apt install libx11-dev
Reading package lists... Done
Building dependency tree
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:
libx11-dev : Depends: libx11-6 (= 2:1.6.4-3ubuntu0.1) but 2:1.6.4-3ubuntu0.2 is to be installed
Depends: libxcb1-dev but it is not going to be installed
Recommends: libx11-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.有两个未满足的依赖项。接下来,我尝试安装第一个依赖项libx11 11-6。
sudo apt install libx11-6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libx11-6 is already the newest version (2:1.6.4-3ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.如您所见,它已经安装,而且它也是最新版本,2:1.6.4-3 ubuntu0.2。正如您在第一条消息中所看到的,这似乎是必需的版本。第二个“未满足”依赖也会出现类似的问题。
问题似乎是我拿着破碎的包裹。我试过很多方法来解决这个问题,但据我所知,我并没有拿着任何破碎的包裹。当我尝试:
dpkg --get-selections | grep hold没有输出。同样,"sudo apt install -f“也不会修复任何问题。
以下是更多可能有帮助的输出
cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805)]/ bionic main restricted
deb-src http://archive.ubuntu.com/ubuntu bionic main restricted #Added by software-properties
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://fi.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-src http://fi.archive.ubuntu.com/ubuntu/ bionic universe main restricted multiverse
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://fi.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://fi.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://fi.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://fi.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://fi.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://fi.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://fi.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
## or updates from the Ubuntu security team.
# deb-src http://fi.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe 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 bionic partner
deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb-src http://security.ubuntu.com/ubuntu bionic-security universe main restricted multiverse
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
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse和
cat /etc/apt/sources.list.d/*
deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
deb http://ppa.launchpad.net/jtaylor/keepass/ubuntu bionic main
deb-src http://ppa.launchpad.net/jtaylor/keepass/ubuntu bionic main
deb http://ppa.launchpad.net/jtaylor/keepass/ubuntu bionic main
deb-src http://ppa.launchpad.net/jtaylor/keepass/ubuntu bionic main
deb http://ppa.launchpad.net/libretro/stable/ubuntu bionic main
deb-src http://ppa.launchpad.net/libretro/stable/ubuntu bionic main
deb http://ppa.launchpad.net/libretro/stable/ubuntu bionic main
deb-src http://ppa.launchpad.net/libretro/stable/ubuntu bionic main
deb http://ppa.launchpad.net/pedrocastro/ppa/ubuntu bionic main
deb-src http://ppa.launchpad.net/pedrocastro/ppa/ubuntu bionic main
deb http://ppa.launchpad.net/pedrocastro/ppa/ubuntu bionic main
deb-src http://ppa.launchpad.net/pedrocastro/ppa/ubuntu bionic main发布于 2020-04-17 08:26:16
因此,我通过安装和使用apt来代替apt (sudo智能安装包装名称)来解决这个问题。这将尝试更彻底地解决问题,然后为您提供解决方案。我拒绝了第一个解决方案,下一个建议是降低依赖性。这修复了所有依赖项和包能够安装。
我还是不明白为什么这个问题会发生在我的系统里。它在安装Nvidia驱动程序时也出现了。我不知道这是我的存储库或ppa的问题,还是sources.list之类的问题。
https://askubuntu.com/questions/1226543
复制相似问题