Ubuntu – Ubuntu 16.04: appstreamcli error while get-update


I am trying to enable WiFi. I tried sudo apt-get update. But I am getting this error:

The AppStream system cache was updated, but some errors were detected, which might lead to missing metadata. Refer to the verbose log for more information.
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

How can I complete sudo apt-get update and enable Wifi in Ubuntu-16.04?

Best Answer

I have had the same problem and the problem was that there was (in my case) an inappropriately escaped character in file /var/cache/app-info/xmls/fwupd.xml in line 265 which broke the xml, hence the error. In line <checksum filename="Firmware_SF30&SN30_Pro_V1.26.dat" target="content" type="sha1">3ef2bdee8aca2a45b9f53b4d4cce9722523f57f8</checksum> the & symbol must be encoded &amp; for this to be a valid xml.

Related Question