(appstreamcli:13767): GLib-CRITICAL **: 08:57:18.126: g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types || GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite (GVSB(builder)->type)' failed
(appstreamcli:13767): GLib-CRITICAL **: 08:57:18.126: g_variant_new_variant: assertion 'value != NULL' failed
(appstreamcli:13767): GLib-ERROR **: 08:57:18.126: g_variant_new_parsed: 11-13:invalid GVariant format string
Trace/breakpoint trap (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-cache > /dev/null; fi'
E: Sub-process returned an error code
答案1
以下适用于我:
apt-get install --reinstall libappstream4
查看此主题以了解详情: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906538
答案2
我遇到了与上述完全相同的问题。我的解决方法很简单:转到 /etc/apt/
并查看sources.list
文件。确保其中没有“实验性”的存储库。还要进入/etc/apt/sources.list.d
并查找任何带有.list
扩展名的文件。确保这些文件也不包含“实验性”或“测试版”存储库。
unstable.list
我的问题具体是由以下文件中的这个 repo 条目引起的/etc/apt/sources.list.d
deb http://deb.debian.org/debian/ unstable main
我只是注释掉了它并重新运行apt-get update
。如果这里的问题具体出在您的 apt 源上,则无需重新安装任何东西。运行上一条注释中列出的清除和删除命令极其危险。
这是我原始问题的输出。
root@localhost:~# apt-get update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Hit:2 http://deb.debian.org/debian unstable InRelease
Ign:3 http://ftp.us.debian.org/debian stretch InRelease
Hit:4 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:5 http://ftp.us.debian.org/debian stretch Release
Ign:6 http://httpredir.debian.org/debian stretch InRelease
Hit:7 http://httpredir.debian.org/debian stretch Release
(appstreamcli:10995): GLib-CRITICAL **: g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types || GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite (GVSB(builder)->type)' failed
(appstreamcli:10995): GLib-CRITICAL **: g_variant_new_variant: assertion 'value != NULL' failed
(appstreamcli:10995): GLib-ERROR **: g_variant_new_parsed: 11-13:invalid GVariant format string
Trace/breakpoint trap
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
答案3
我在 debian buster 中遇到了同样的问题并发现这个有效:这
清除 appstream 和 gnome 包(为了安全起见,列出稍后要重新安装的包):
# apt-get remove --purge appstream gnome*
您可以使用该命令tasksel --list-tasks
查看可供安装的桌面选项。