0

So I'm trying to compile Aseprite, and I'm unable to install a package I need in this process: libx11-dev. Here is the output for "sudo apt install libx11-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.

There are two unmet dependencies. Next I tried installing the first dependency, libx11-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.

As you can see it is already installed, and it is also the latest version, 2:1.6.4-3ubuntu0.2. This seems to be the required version, as you can see in the first message. A similar problem happens with the second "unmet" dependency.

It seems the problem is that I have held broken packages. I have tried many things to fix this, but as far as I can tell, I am not holding any broken packages. When I try:

dpkg --get-selections | grep hold

There is no output. Similarly "sudo apt install -f" does not fix anything.

Here are more outputs that may help

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

and

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

1 Answers1

0

So I solved the issue by installing and using aptitude to install instead of apt (sudo aptitude install [packagename]). This will try to more thoroughly fix the problem and then offer you a solution. I rejected the first solution and the next suggestion was to downgrade the dependencies. This fixed all the dependencies and the package was able to install.

I still don't understand why this problem is happening on my system. It also appeared while installing Nvidia drivers. I don't know if it is a problem with my repositories or ppa's, or something with sources.list or something similar.