트러블슈팅(Trouble Shooting)

(appstreamcli:6766): GLib-ERROR :apt update 에러

토끼C 2023. 6. 28. 12:12
반응형

우분투에서 apt update를 하던 중 다음과 같은 에러가 발생했다.

root@LYJ:~# sudo apt update
Hit:1 <http://kr.archive.ubuntu.com/ubuntu> bionic InRelease
Get:2 <http://security.ubuntu.com/ubuntu> bionic-security InRelease [88.7 kB]
Get:3 <http://kr.archive.ubuntu.com/ubuntu> bionic-updates InRelease [88.7 kB]
Get:4 <http://kr.archive.ubuntu.com/ubuntu> bionic-backports InRelease [83.3 kB]
Fetched 261 kB in 2s (159 kB/s)

(appstreamcli:6766): GLib-CRITICAL **: 17:38:18.501: 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:6766): GLib-CRITICAL **: 17:38:18.502: g_variant_new_variant: assertion 'value != NULL' failed

(appstreamcli:6766): GLib-ERROR **: 17:38:18.502: 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

 

libappstream4 해당 라이브러리를 설치하니 해결되었다.

apt-get install --reinstall libappstream4

다시 update를 실행하니 해결되었다.

root@LYJ:~# sudo apt update
Get:1 <http://security.ubuntu.com/ubuntu> bionic-security InRelease [88.7 kB]
Hit:2 <http://kr.archive.ubuntu.com/ubuntu> bionic InRelease
Get:3 <http://kr.archive.ubuntu.com/ubuntu> bionic-updates InRelease [88.7 kB]
Get:4 <http://kr.archive.ubuntu.com/ubuntu> bionic-backports InRelease [83.3 kB]
Fetched 261 kB in 2s (130 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
774 packages can be upgraded. Run 'apt list --upgradable' to see them.
반응형