43

I am getting the following error when I run sudo apt update

Aborted (core dumped)
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'
E: Sub-process returned an error code
Zanna
  • 72,312
subrat
  • 431

2 Answers2

63

Remove libappstream3 with the CLI command

sudo apt-get remove libappstream3

or

sudo apt remove libappstream3

Afterwards, apt update should work fine again.

Source: https://forum.siduction.org/index.php?topic=6174.0

Ulf
  • 631
6

(in Matthias' comment https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712/comments/24 on bug #1579712) worked for me.

Removing /usr/bin/appstreamcli is fine if you install the fixed package afterwards.

To install this manually, please do (for amd64, adjust URLs for other architectures):

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

This should solve the issue.

karel
  • 122,292
  • 133
  • 301
  • 332