9

This question already has an answer here:

It started few days ago. I'm running sudo apt update command and it never ends. Terminal output is

Get:1 http://ru.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease                     
Hit:3 http://ppa.launchpad.net/attente/java-non-latin-shortcuts/ubuntu xenial InRelease
Hit:4 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:6 http://ru.archive.ubuntu.com/ubuntu xenial-updates InRelease             
Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]    
Hit:8 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:9 http://ru.archive.ubuntu.com/ubuntu xenial-backports InRelease           
Fetched 341 kB in 2s (150 kB/s)

While this proccess system fan speed is boosted on my laptop and it's kinda annoying to listen to this. There is no excessive cpu activity though. Can you guys hint me why it happens?

marked as duplicate by Braiam, jokerdino May 20 '16 at 14:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    I have that problem as well since today (16.04) if i do run 'sudo apt update' or 'sudo apt-get update'. 'apt clean' doesnt help here. I do use other mirros then you - so its most likely not related with this aspect. – dufte May 20 '16 at 7:20
14

It's a bug. Look at https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712/. The problem is that the bug is affecting the update process, so you can't update. Catch 22.

So to solve it you have to manually install the broken packages.

If the system tried to do the update, you'll probably have a rogue appstreamcli running --- using 100% of your CPU; it will also have a lock held on the apt database, which will block any upgrade attempt.

To solve it, you have to kill the rogue appstreamcli --- ypu can find its PID by running top, and then

sudo kill <PID here>

The second step is to manually update the failing packages as in: (Notice: on a 64-bit system; if you run a 32 bit system you must change the links accordingly, using i386 in lieu of amd64)

cd /tmp && mkdir asfix
cd asfix
wget https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i *.deb

as posted in comment #24 of the bug report.

Now you can update your system; once you successfully do that, you can safely remove the downloaded packages.

Nice bug.

BTW --- this is the same as appstreamcli hanging with 100% CPU usage during update and apt-get is stuck at "Fetched XXKb in XXsec"

  • Can I remove the folder and debs after I install them? – JulianLai May 20 '16 at 8:50
  • @JulianLai yes, see the edit. – Rmano May 20 '16 at 9:19
  • Looks like the first step of killing appstreamcli is optional... it wasn't running on my system. The rest worked and fixed my update problem. Thanks. – stmax May 20 '16 at 9:30
  • @stmax yes, see the edit... – Rmano May 20 '16 at 9:43
  • Sad, so many bugs since 16.04 ... – EdiD May 20 '16 at 15:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.