4

There were no issues before, but today I started my computer and I removed the unstable OIBAF graphics drivers and tried to add stable OIBAF graphics PPA. I left for about 15 minutes and when I came back the terminal was stuck at the initial command without any output. It looked like this:

enter image description here

I thought this was an internet issue, but it wasn't. Then I canceled adding the PPA and tried to install it again but had the same issue (the apt-add-repository command does works but takes a lot of time to show any output. Everything was fine before --it took less than a minute to complete-- but now it takes more than 15 minutes).

I've also tried adding different PPAs but had the same issue.

My kernel version is 4.20.0

I've also built a kernel installed and removed but then there was no ppa related issue.

EDIT: There's more delay when I cancel the command with CTRL+C

TheOdd
  • 3,012
knoftrix
  • 419
  • I'd suggest trying again in a few hours - internet connection issues may not be limited to your computer/network, and it may be that some system between your computer and the PPA servers is overloaded – Charles Green Jan 17 '19 at 18:10
  • @Charles Green No it is not internet issue at all. My laptop with mint connected to same network works fine. Also my computer is new so no problem of ports/wifi etc. it is just all repositories are slow. – knoftrix Jan 17 '19 at 18:18
  • 1
    @pomsky I'd add a traceroute from me to launchpad (8 hops), but in comments that's a painful experience. – Charles Green Jan 17 '19 at 19:00
  • 1
    I solved problem by deleting repositories with missing gpg keys – knoftrix Jan 21 '19 at 09:54
  • @SaurabhSingh how exactly did you do that? I am having the same problem and would like to solve that. Could you share commands to delete repos with missing gpg keys? – matt525252 Apr 05 '20 at 21:24
  • @matt525252 sudo add-apt-repository -r ppa:<ppa to remove> or edit /etc/apt/sources.list.d.You have to find repositoriy with missing keys though. Also you can add missing keys, follow this answer https://askubuntu.com/a/141088/898816 – knoftrix Apr 06 '20 at 17:12
  • Thank you for reply. How exactly can I find which one has a missing gpg key? – matt525252 Apr 06 '20 at 21:12
  • @matt525252 When you do apt update there should be some warnings like W: GPG error: <repository> – knoftrix Apr 07 '20 at 15:32

3 Answers3

7

I came here for the same reason that,

apt-add-repository command does works but takes a lot of time to show any output -- now it takes more than 15 minutes.

and I found the root cause and solution from https://unix.stackexchange.com/questions/500286/

It seems to be a DNS routing issue.

temporarily disabled IPv6 fixed the problem:

sudo sysctl net.ipv6.conf.all.disable_ipv6=1

xpt
  • 1,045
2

I found the issue, it was due to other unsigned repository I added to my system because of this there is a lot of delay in adding PPAs. Simply remove those unsigned PPAs and problem will be solved.

knoftrix
  • 419
0

my problem was ip6tables input policy set to DROP without allowing local traffic. these need to be there:

ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

after adding rules the system resolved all repositories.

btw., i found that strace command often output exact address system hang trying to resolve, making this easier to debug.

Sunny
  • 1