完整报错:
$ sudo apt update
...
(appstreamcli:27333): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed(appstreamcli:27333): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed
free(): double free detected in tcache 2
Aborted (core dumped)
Reading package lists... Done
W: http://files.freeswitch.org/repo/ubuntu-1604/freeswitch-1.6/dists/xenial/InRelease: Signature by key ACAD66137D22A8A469FBB57F1FDDF413C2B201E5 uses weak digest algorithm (SHA1)
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
解决:
$ sudo pkill -KILL appstreamcli
$ wget -P /tmp https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb --no-check-certificate
$ sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb
$ sudo apt update
https://blog.csdn.net/csdnjyc/article/details/84594511