'apt-get update' gets stuck for hours at "100% [Working]" for specific PPA
Solution 1
After having waited for the command to complete for hours, I saw that it hangs on all tox repositories.
I checked their main page and found out, that the whole infrastructure including repositories, wiki and main site moved to a different domain. That's why the old URL is not alive any more and why apt-get update
is timing out.
On their new wiki, they gave the following (slightly modified) script to install the actualized repository:
#!/bin/bash
sudo apt-key del 0C2E03A0
sudo sh -c 'echo "deb https://pkg.tox.chat/debian nightly main" > /etc/apt/sources.list.d/tox.list'
wget -qO - https://pkg.tox.chat/debian/pub.gpg.key | sudo apt-key add -
sudo apt-get install apt-transport-https
sudo apt-get update
echo "Tox Repository Installed. You can now install qtox"
I executed those lines and now all problems with apt-get update
are gone!
Unfortunately, the new repository does only contain 64bit builds of qTox yet, so I will have to live with that package being hold back for a while, until they also compile it for 32bit machines!
WARNING: If you have 32bit qTox installed, do not install the new repository! It contains a 32bit qtox
package with higher version number than the last one available, so apt-get upgrade
will install it and replace your current qTox installation with that one, as soon as you run updates. But it is not a 32bit package, it just looks like one! Inside it contains 64bit executables!
For more information and a script to verify the package's true architecture without having to install it, see my Q&A here!
The last repository update fixed this and qTox is now available for both architectures again! :)
Solution 2
I recognized this problem from time to time and from amchine to machine. I got rid of it by simply changing the to main mirror server - called in the german version you are using "Haupt-Server"
Since I changed away from "German Servers" to "Main Server" everything is fine...
Related videos on Youtube
Byte Commander
Ask Ubuntu moderator♦, IT student and DevOps engineer. I love Ubuntu, Python, good music and coffee, although not necessarily in that order. You can easily contact me in the Ask Ubuntu General Room most of the time, or on Discord as @ByteCommander#2800. I'd also love to invite you to my Ubuntu Hideout Discord Server btw. PS: My profile picture is derived from "Wolf Tribals" by user HaskDitex (DeviantArt.com), which is under creative Commons 3.0 License. Currently I'm using the character "Dregg Morriss" from the game "Medieval Cop" by Vasant Jahav ("Gemini Gamer"). It can be found here.
Updated on September 18, 2022Comments
-
Byte Commander over 1 year
When I run
sudo apt-get update
on Ubuntu 15.04, I get the following (shortened) output:$ LANG=C sudo apt-get update [sudo] password for ipc-admin: Ign http://ftp.uni-stuttgart.de vivid InRelease Ign http://ftp.uni-stuttgart.de vivid-updates InRelease . . . Hit http://ftp.uni-stuttgart.de vivid-proposed/universe Translation-en Hit http://ftp.uni-stuttgart.de vivid-proposed/universe Translation-de 100% [Working]
Then it gets stuck and won't continue until I interrupt it with Ctrl+C.
When I do
sudo aptitude update
instead, it also hangs at the same position.After deleting the cache with
sudo rm -rf /var/lib/apt/lists
and runningsudo apt-get update
again, I still get the same results.However, it seems to have successfully updated the package index files after running
sudo apt-get update
and interrupting it when it gets stuck, as I still can runapt-get upgrade
and receive new updates, orapt-get install
. It just does not finish theapt-get update
task...A reinstall of
apt
withsudo aptitude reinstall apt
and a reboot afterwards did not change my situation either.What might be the problem here and how can I fix it?
PS: The full output of
apt-get update
recorded withscript
that also shows those dynamic lines may be found on pastebin.
UPDATE
After letting it run for hours, it actually finishes! The repositories that cause the problem are various
https://repo.tox.im
lines. Here what appears after loooong times of waiting between each line:Ign https://repo.tox.im nightly InRelease Ign https://repo.tox.im nightly Release.gpg Ign https://repo.tox.im nightly Release Err https://repo.tox.im nightly/main i386 Packages Connection timed out after 120000 milliseconds Ign https://repo.tox.im nightly/main Translation-en Ign https://repo.tox.im nightly/main Translation-de Fetched 69,8 kB in 36min 0s (32 B/s) W: Failed to fetch https://repo.tox.im/dists/nightly/main/binary-i386/Packages Connection timed out after 120000 milliseconds E: Some index files failed to download. They have been ignored, or old ones used instead.
After this, the process terminates correctly without having to interrupt it. So what can be the problem with that repository and how may I fix it?
-
Admin almost 9 yearsYou should try:
# sudo -s -H
# apt-get clean
# rm /var/lib/apt/lists/*
# rm /var/lib/apt/lists/partial/*
# apt-get clean
# apt-get update
-
Admin almost 9 years@ParanoidPanda Did not work... :-(
-
Admin almost 9 years@ParanoidPanda It's the exact same base, installing GNOME won't help it. Also, this isn't the place for stuff like this - especially not in multiple comment-form.
-
Admin almost 9 years@ParanoidPanda Yes, reinstalling might resolve this. However, I would still wait and see if there's more responses.
-
Admin almost 9 yearsI had the same problem a while ago... Just try to switch to other server closer to you and it might work out just fine.
-
Admin almost 9 years@JoKeR I switched my server, but nothing changed. If you look at the pastebin log (end of the log), you see that it already fetched all index files but gets stuck while somehow processing them! - Anyway, the new indexes are there and intact, as I still receive upgrades and can install them as well as new software.
-
Admin almost 9 yearsthat's the same as I had the index files got fetched but stuck installing them... What I did as far as I remember I switched to the best server closer to me and I also used Bleachbit to clear the old stuff and those steps worked for me.
-
Admin over 8 yearsAlso got stopped by
repo.tox.im
. -
Admin over 6 yearsThis may help you askubuntu.com/questions/574569/…
-
-
Byte Commander over 8 yearsMight be more secure in general, but would not have solved my specific problem, as it was a third-party repository and therefore not affected by this option. Besides, regional German servers are faster than the main server, so I won't change.
-
Mr.Gosh over 8 yearsAS I had exactly the problem you described several times Witz the Herman Servers without 3rd Party ppa's I thought I contribute that... 😊
-
Byte Commander over 7 yearsPlease look at the accepted answer (which I even wrote myself), the problem has been solved for over a year now.