0
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                        
Hit:3 http://packages.microsoft.com/repos/vscode stable InRelease              
Hit:4 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease    
Hit:5 https://deb.opera.com/opera-stable stable InRelease                      
/usr/bin/gdbus: error while loading shared libraries: libgio-2.0.so.0: cannot open shared object file: No such file or directory
appstreamcli: error while loading shared libraries: libappstream.so.4: cannot open shared object file: No such file or directory
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-cache > /dev/null; fi'
E: Sub-process returned an error code

This is what I get now

  • @karel E: Unable to locate package libappstream3, This is what I get from sudo apt-get purge libappstream3 – Osman Omar Nov 24 '18 at 9:20
  • @karel Also, my software & update don't open, are these two errors connected? I'm suffering from this 3 days – Osman Omar Nov 24 '18 at 9:29
0

In Ubuntu 18.04 and later open the terminal and type:

sudo apt install libappstream4  
sudo rm /var/cache/app-info/xmls/fwupd.xml   
sudo appstreamcli refresh --force 
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.bak  
sudo cp /var/backups/dpkg.status.*.gz /var/lib/dpkg/  
sudo gunzip -d /var/lib/dpkg/dpkg.status.*.gz  
sudo mv -T /var/lib/dpkg/dpkg.status.0 /var/lib/dpkg/status  
  • Package 'libappstream4' is not installed, so not removed – Osman Omar Nov 24 '18 at 9:28
  • rm: cannot remove '/var/cache/app-info/xmls/fwupd.xml': No such file or directory – Osman Omar Nov 24 '18 at 9:34
  • That's OK. There's no such file or directory named '/var/cache/app-info/xmls/fwupd.xml' in my Ubuntu 18.04 either, and in this case the command does nothing. – karel Nov 24 '18 at 9:36
  • sudo apt-get updte still has error – Osman Omar Nov 24 '18 at 9:37
  • 1
    Now, I have different from previous error – Osman Omar Nov 24 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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