Ubuntu常见问题(1)

sudo apt-get update报错、搜狗输入法安装、安装卸载vscode

sudo apt-get update报错

错误信息:

(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

解决方法:

apt-get install --reinstall libappstream4

搜狗输入法安装

1:安装 https://blog.csdn.net/ourjaycn/article/details/124318570
只能下载2.3版本(或者其他2.x版本)的,不要下载官网3.x或者4.x版本,不然安装了也用不了,这是最关键的一点,切记!!

wget http://cdn2.ime.sogou.com/dl/index/1571302197/sogoupinyin_2.3.1.0112_amd64.deb
sudo dpkg -i sogoupinyin_2.3.1.0112_amd64.deb

如果安装失败,请执行如下命令安装依赖,然后再执行上面的安装命令

sudo apt -f install

2:配置 https://shurufa.sogou.com/linux/guide
打开 系统设置——区域和语言——管理已安装的语言——在“语言”tab下——点击“添加或删除语言”
弹出“已安装语言”窗口,勾选中文(简体),点击应用
回到“语言支持”窗口,在键盘输入法系统中,选择“fcitx”
3:卸载 https://blog.csdn.net/shaqilaixi2/article/details/122849189

sudo apt-get purge sogoupinyin

安装卸载vscode

1:下载:https://code.visualstudio.com/

2:安装

sudo dpkg -i code_1.76.0-1677667493_amd64.deb

3:卸载

sudo dpkg --remove  code           # 只是卸载,保留配置
sudo dpkg -r code                  # 彻底清除,包括配置
sudo dpkg --purge  code            # 彻底清除,包括配置

猜你喜欢

转载自blog.csdn.net/qq_38589460/article/details/129418490