# Circle-ci config hangs at add-apt-repository -y for a long time

**URL:** <https://discuss.circleci.com/t/circle-ci-config-hangs-at-add-apt-repository-y-for-a-long-time/23427>\
**Category:** Build Environment\
**Created:** [July 5, 2018, 3:12pm UTC](https://discuss.circleci.com/t/circle-ci-config-hangs-at-add-apt-repository-y-for-a-long-time/23427 "2018-07-05T15:12:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diehlpk](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/diehlpk/32/12934_2.png) [@diehlpk](https://discuss.circleci.com/u/diehlpk)\
**Post date:** [July 5, 2018, 3:12pm UTC](https://discuss.circleci.com/t/circle-ci-config-hangs-at-add-apt-repository-y-for-a-long-time/23427/1 "2018-07-05T15:12:29Z")

</div>

```
    #!/bin/bash -eo pipefail
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update

```

I tried several builds and stopped all of them after 5 minutes after nothing happens when executing this command. For debugging, I removed the first command and now the same issue arises for this command

`sudo apt-get install -y gcc-6 g++-6 gfortran-6 cmake libgoogle-perftools-dev libhwloc-dev wget doxygen libvtk6-dev libpq5`

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 5, 2018, 5:20pm UTC](https://discuss.circleci.com/t/circle-ci-config-hangs-at-add-apt-repository-y-for-a-long-time/23427/2 "2018-07-05T17:20:11Z")

</div>

Can you try `apt-get update` in an SSH session?

What base `docker` image are you running? (assuming you are running CircleCI 2.0 with the Docker executor).

---

<div class="post-metadata">

**Author:** ![diehlpk](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/diehlpk/32/12934_2.png) [@diehlpk](https://discuss.circleci.com/u/diehlpk)\
**Post date:** [July 5, 2018, 5:26pm UTC](https://discuss.circleci.com/t/circle-ci-config-hangs-at-add-apt-repository-y-for-a-long-time/23427/3 "2018-07-05T17:26:36Z")

</div>

Yes, I am using CircleCI 2.0. I merged the branch into master and master failed too. I generated a new branch and tested this new branch and it passed.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [October 3, 2018, 5:26pm UTC](https://discuss.circleci.com/t/circle-ci-config-hangs-at-add-apt-repository-y-for-a-long-time/23427/4 "2018-10-03T17:26:45Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
