Build suddenly starting to error out - unmet package dependencies

My build was working fine this morning, but now I have errors
about unmet dependencies:

Here is a link to the logs:

Error message:

E: Unable to correct problems, you have held broken packages.
apt-get.diagnostics

apt-get install failed

The command “sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install g+±9” failed and exited with 100 during .

Same thing when trying to install gcc-9 and g+±9 on Bionic: https://travis-ci.org/github/VioletGiraffe/cpp-db/builds/675919053

Worked fine just a couple days ago.

https://travis-ci.org/github/GrokImageCompression/grok/jobs/675868610#L234-L236

The following packages have unmet dependencies:
 g++-9 : Depends: gcc-9 (= 9.2.1-17ubuntu1~18.04.1) but it is not going to be installed
         Depends: libstdc++-9-dev (= 9.2.1-17ubuntu1~18.04.1) but it is not going to be installed

Looks like the package dependencies changed. Adding gcc-9 and libstdc++-9-dev should resolve the issue.

https://travis-ci.org/github/BanzaiMan/travis_production_test/builds/675926200#L172

Thanks, Unfortunately, that didn’t work.

Run the same apt invocation manually, adding -o Debug::pkgProblemResolver=yes to it.

This will show which packages are conflicting with those that you are installing.

Usually, this error means that some of the preinstalled conflicting dependency packages have been installed manually and as such, they aren’t being replaced automatically unless you explicitly specify a corresponding replacement dependency.

E.g. this has happened before in

$ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
before_install.2
8.01s$ sudo add-apt-repository -y ppa:beineri/opt-qt-5.14.1-bionic
before_install.3
2.76s$ sudo apt update
before_install.4
7.13s$ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
before_install.5
7.39s$ sudo add-apt-repository -y ppa:beineri/opt-qt-5.14.1-bionic
before_install.6
2.71s$ sudo apt update
install.1
2.35s$ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qy update; fi
0.67s$ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq g++-9 gcc-9 -o Debug::pkgProblemResolver=yes; fi
Starting pkgProblemResolver with broken count: 2
Starting 2 pkgProblemResolver with broken count: 2
Investigating (0) gcc-9:amd64 < none -> 9.2.1-17ubuntu1~18.04.1 @un puN Ib >
Broken gcc-9:amd64 Depends on cpp-9:amd64 < none | 9.2.1-17ubuntu1~18.04.1 @un uH > (= 9.2.1-17ubuntu1~18.04.1)
  Considering cpp-9:amd64 0 as a solution to gcc-9:amd64 10000
  Re-Instated cpp-9:amd64
Broken gcc-9:amd64 Depends on libcc1-0:amd64 < 8.3.0-6ubuntu1~18.04.1 | 8.4.0-1ubuntu1~18.04 @ii umH > (>= 9.2.1-17ubuntu1~18.04.1)
Broken gcc-9:amd64 Depends on libgcc-9-dev:amd64 < none | 9.2.1-17ubuntu1~18.04.1 @un uH > (= 9.2.1-17ubuntu1~18.04.1)
  Considering libgcc-9-dev:amd64 0 as a solution to gcc-9:amd64 10000
    Reinst Failed early because of libgcc1:amd64
Investigating (0) g++-9:amd64 < none -> 9.2.1-17ubuntu1~18.04.1 @un puN Ib >
Broken g++-9:amd64 Depends on libstdc++-9-dev:amd64 < none | 9.2.1-17ubuntu1~18.04.1 @un uH > (= 9.2.1-17ubuntu1~18.04.1)
  Considering libstdc++-9-dev:amd64 0 as a solution to g++-9:amd64 9999
    Reinst Failed because of libgcc-9-dev:amd64
Done
E: Unable to correct problems, you have held broken packages.

Any idea what’s the actual problem?

No idea!! I tried adding dependencies in, but doesn’t help.

We really need an explanation from Travis people on what changed and why the build suddenly broke.

ppa:ubuntu-toolchain-r/test is broken. Some of its packages – libgcc-9-dev in particular – require dependencies (libgcc1 in particular) of greater versions than available in either stock Bionic repos or that PPA. The PPA should be providing those, I guess, since they are a part of the toolchain.

1 Like

Ahhh, ok, that makes sense. I emailed the maintainer of that ppa.

The PPA maintainer has fixed the issue.

1 Like