Ubuntu 16.04: appstreamcli error while get-update

Nid*_*hta 11 updates apt 16.04 appstream

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
Run Code Online (Sandbox Code Playgroud)

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

Nik*_*ola 11

我遇到了同样的问题,问题是(在我的情况下)/var/cache/app-info/xmls/fwupd.xml第 265 行的文件中有一个不恰当的转义字符,它破坏了 xml,因此出现了错误。在行中<checksum filename="Firmware_SF30&SN30_Pro_V1.26.dat" target="content" type="sha1">3ef2bdee8aca2a45b9f53b4d4cce9722523f57f8</checksum>&必须对符号进行编码&amp;才能使其成为有效的 xml。


Yar*_*ron 5

A similar bug was reported here

这个答案提出了以下建议以解决它(一些人说它帮助了他们):

/usr/bin/appstreamcli如果您之后安装固定包,则删除是可以的。

要手动安装,请执行以下操作(对于 amd64,请调整其他架构的 URL):

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
Run Code Online (Sandbox Code Playgroud)