9
(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

3 Answers 3

14

Following works for me:

apt-get install --reinstall libappstream4

Check this thread for details: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906538

2
  • naah. still same
    – greendino
    Jan 10, 2021 at 18:19
  • Worked perfectly. Thanks.
    – Alz
    Dec 14, 2023 at 22:32
-1

I had the same exact issue as stated above. my fix was simple go to /etc/apt/ and review the sources.list file. Ensure that there are no repos in there which are "experimental". Also go into /etc/apt/sources.list.d and look for any files with .list extensions. Make sure those also don't contain "experimental" or "beta" repositories.

My issue specifically was caused by this repo entry in the unstable.list file under /etc/apt/sources.list.d

deb http://deb.debian.org/debian/ unstable main

I just commented that out and re-ran apt-get update. There is no need to reinstall anything if the problem here is specifically with your apt sources. It is extremely dangerous to run the purge and remove command listed in a previous comment.

This is the output from my original problem.

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
0
-2

I had the same problem in debian buster and found this to work: this

  1. Purge appstream and gnome packages (to be safe, make a list of packages to re-install latter on):

    # apt-get remove --purge appstream gnome*
    

You can use the command tasksel --list-tasks to see available desktop options to install.

4
  • 1
    are you sure to run apt-get remove --purge gnome*? that's will remove all gnome packages which to handle Ubuntu Packages Graphical and your link reference is not yet get response another users, is it an good answer or an bad answer!!! Nov 28, 2018 at 15:43
  • That's what I did, remove all gnome packages and reinstalled the task-gnome-desktop, that will reinstall the desktop environment back. That fixed the problem. Nov 28, 2018 at 17:46
  • I had the same error (while installing a php package) , but I did not have to remove/reinstall gnome to get it solved.
    – hornetbzz
    Dec 22, 2018 at 23:08
  • Would be nice if you publish your solution. Windows like solutions like reinstall things are not good solutions for sure. Dec 26, 2018 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .