# Build suddenly starting to error out - unmet package dependencies

**URL:** <https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182>\
**Category:** Linux\
**Created:** [April 16, 2020, 7:45pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182 "2020-04-16T19:45:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![boxerab](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/boxerab/32/3873_2.png) [@boxerab](https://travis-ci.community/u/boxerab)\
**Post date:** [April 16, 2020, 7:45pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/1 "2020-04-16T19:45:06Z")

</div>

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

Here is a link to the logs:

> **[Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/GrokImageCompression/grok/jobs/675868610)**
>
> Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.

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 .

---

<div class="post-metadata">

**Author:** ![VioletGiraffe](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/violetgiraffe/32/5003_2.png) [@VioletGiraffe](https://travis-ci.community/u/VioletGiraffe)\
**Post date:** [April 16, 2020, 8:21pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/2 "2020-04-16T20:21:26Z")

</div>

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

Worked fine just a couple days ago.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [April 16, 2020, 8:35pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/3 "2020-04-16T20:35:50Z")

</div>

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

```auto
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](https://travis-ci.org/github/BanzaiMan/travis_production_test/builds/675926200#L172)

---

<div class="post-metadata">

**Author:** ![boxerab](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/boxerab/32/3873_2.png) [@boxerab](https://travis-ci.community/u/boxerab)\
**Post date:** [April 16, 2020, 8:41pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/4 "2020-04-16T20:41:13Z")

</div>

> [@BanzaiMan](#):
>
> `libstdc++-9-dev`

Thanks, Unfortunately, that didn’t work.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [April 16, 2020, 9:07pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/5 "2020-04-16T21:07:17Z")

</div>

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

> [@Failures installing MariaDB 10.2 on Xenial](https://travis-ci.community/t/failures-installing-mariadb-10-2-on-xenial/5284/4):
>
> Okay, I found the cause of the discrepancy. In Xenial, [all 4 MySQL packages are marked as manually installed](https://travis-ci.org/native-api/test_travis/builds/593803507#L602-L606). So [I’d have to supply all the 4 corresponding MariaDB packages on the command line manually, too,](https://travis-ci.org/native-api/test_travis/builds/593807343#L221) for them to override the MySQL ones. @BanzaiMan I could make a workaround PR so that MariaDB addon starts working in Xenial+ before [https://github.com/travis-ci/travis-cookbooks/pull/1057](https://github.com/travis-ci/travis-cookbooks/pull/1057) is deployed. But I would rather help you resolve whatever problem you are having with updating VM …

---

<div class="post-metadata">

**Author:** ![VioletGiraffe](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/violetgiraffe/32/5003_2.png) [@VioletGiraffe](https://travis-ci.community/u/VioletGiraffe)\
**Post date:** [April 16, 2020, 9:56pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/6 "2020-04-16T21:56:02Z")

</div>

```
$ 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?

---

<div class="post-metadata">

**Author:** ![boxerab](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/boxerab/32/3873_2.png) [@boxerab](https://travis-ci.community/u/boxerab)\
**Post date:** [April 16, 2020, 11:41pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/7 "2020-04-16T23:41:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [April 17, 2020, 1:50am UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/8 "2020-04-17T01:50:52Z")

</div>

**`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.

---

<div class="post-metadata">

**Author:** ![boxerab](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/boxerab/32/3873_2.png) [@boxerab](https://travis-ci.community/u/boxerab)\
**Post date:** [April 17, 2020, 2:24am UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/9 "2020-04-17T02:24:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![boxerab](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/boxerab/32/3873_2.png) [@boxerab](https://travis-ci.community/u/boxerab)\
**Post date:** [April 17, 2020, 12:18pm UTC](https://travis-ci.community/t/build-suddenly-starting-to-error-out-unmet-package-dependencies/8182/10 "2020-04-17T12:18:08Z")

</div>

The PPA maintainer has fixed the issue.
