# Apt-get install failed for clang-5.0

**URL:** <https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417>\
**Category:** Linux\
**Created:** [July 27, 2019, 7:40am UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417 "2019-07-27T07:40:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cherusker](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/cherusker/32/2357_2.png) [@cherusker](https://travis-ci.community/u/cherusker)\
**Post date:** [July 27, 2019, 7:40am UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/1 "2019-07-27T07:40:52Z")

</div>

We use a fairly standard Travis setup

```auto
git:
  depth: 1
  submodules: false

matrix:
  include:
    - os: linux
      language: cpp
      compiler: clang
      addons:
        apt:
          sources: llvm-toolchain-trusty-5.0
          packages: clang-5.0
      env:
        - TRAVIS_CI_ROW="regression-suite"
        - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
    - os: linux
      sudo: required
      services: docker
      env:
        - TRAVIS_CI_ROW="oss-fuzz-build"
        - MATRIX_EVAL=

before_install:
  - sudo apt-get -qq update && sudo apt-get install -y autoconf cmake libtool
  - eval "${MATRIX_EVAL}"

script:
  - bash fuzzing/scripts/run-travis-ci.sh

```

but two days ago our builds stopped working, failing with

```auto
The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install clang-5.0" failed and exited with 100 during .

```

Restarting the build does not help either. I would be very happy for some advice on this.

Thanks  
Armin

---

<div class="post-metadata">

**Author:** ![cherusker](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/cherusker/32/2357_2.png) [@cherusker](https://travis-ci.community/u/cherusker)\
**Post date:** [July 27, 2019, 9:24am UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/3 "2019-07-27T09:24:37Z")

</div>

Sorry, sure: [https://travis-ci.com/freetype/freetype2-testing/builds/120925936](https://travis-ci.com/freetype/freetype2-testing/builds/120925936)

Thanks a lot 🙂

---

<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:** [July 27, 2019, 12:14pm UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/4 "2019-07-27T12:14:27Z")

</div>

> **[Xenial as the default build environment - Travis CI changelog](https://changelog.travis-ci.com/xenial-as-the-default-build-environment-99476)**
>
> As announced two weeks ago, we've started incrementally updating the default build environment to Ubuntu Xenial...

You seem to be using a Trusty-specific 3rd-party repo.

---

<div class="post-metadata">

**Author:** ![cherusker](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/cherusker/32/2357_2.png) [@cherusker](https://travis-ci.community/u/cherusker)\
**Post date:** [July 27, 2019, 12:33pm UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/5 "2019-07-27T12:33:04Z")

</div>

It should still work that way, according to docs: [https://docs.travis-ci.com/user/languages/c/#clang-on-linux](https://docs.travis-ci.com/user/languages/c/#clang-on-linux)

---

<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:** [July 27, 2019, 2:10pm UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/6 "2019-07-27T14:10:40Z")

</div>

If the preinstalled `clang` fits you, you don’t need to try to _install it from elsewhere at the same time_ 🙂 I.e. there’s no need for `addons: apt:`.

---

<div class="post-metadata">

**Author:** ![cherusker](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/cherusker/32/2357_2.png) [@cherusker](https://travis-ci.community/u/cherusker)\
**Post date:** [July 28, 2019, 1:08pm UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/7 "2019-07-28T13:08:05Z")

</div>

Alright, but following the docs exactly ([https://docs.travis-ci.com/user/languages/c/#clang-on-linux](https://docs.travis-ci.com/user/languages/c/#clang-on-linux)) fails as well: [https://travis-ci.com/freetype/freetype2-testing/jobs/220239164/config](https://travis-ci.com/freetype/freetype2-testing/jobs/220239164/config) This must be an issue on Travis’ side of things …

EDIT: afaik Travis’ standard clang version is 3.6 and that doesn’t work for what we need (5 is already not ideal but the lowest we want to do).

---

<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:** [July 28, 2019, 1:53pm UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/8 "2019-07-28T13:53:40Z")

</div>

The doc says to use `apt:` only “to upgrade Clang to a more recent version” – which you don’t need because Xenial has v7 preinstalled. And the examples are for Precise and Trusty as their comments say, neither of which applies to you.  
So the doc is technically correct.  
[Preinstalled versions are in accordance to the doc, too.](https://travis-ci.org/native-api/test_travis/builds/564630827)

---

<div class="post-metadata">

**Author:** ![cherusker](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/cherusker/32/2357_2.png) [@cherusker](https://travis-ci.community/u/cherusker)\
**Post date:** [July 28, 2019, 3:00pm UTC](https://travis-ci.community/t/apt-get-install-failed-for-clang-5-0/4417/9 "2019-07-28T15:00:43Z")

</div>

Aaaaaahhhhh, now I get it! Thanks a lot, it builds again 🥰
