安装fcitx-frontend-qt5支持Ubuntu16.04下QT5.9中文输入

命令:sudo apt-get install fcitx-frontend-qt5
错误提示如下:

tavi@Tavi:~$ sudo apt-get install fcitx-frontend-qt5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 fcitx-frontend-qt5 : Depends: fcitx-module-dbus
                      Depends: libfcitx-qt5-1 (>= 1.0.0) but it is not going to be installed
 ubuntu-core-launcher : Depends: snapd (= 2.47.1) but 2.38~14.04 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
tavi@Tavi:~$ apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

安装关联包,也是无果的,会陷入无限的死循环当中。

按照错误提示,解除关联安装
命令:sudo apt-get -f install
但还是出现错误

tavi@Tavi:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  cgroup-lite linux-generic-lts-xenial
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  snapd
The following packages will be upgraded:
  snapd
1 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.
25 not fully installed or removed.
Need to get 0 B/20.1 MB of archives.
After this operation, 36.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 256624 files and directories currently installed.)
Preparing to unpack .../snapd_2.47.1_amd64.deb ...
Failed to stop snapd.autoimport.service: Unit snapd.autoimport.service not loaded.
Failed to stop snapd.socket: Unit snapd.socket not loaded.
Failed to stop snapd.service: Unit snapd.service not loaded.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to stop snapd.apparmor.service: Unit snapd.apparmor.service not loaded.
Failed to stop snapd.autoimport.service: Unit snapd.autoimport.service not loaded.
Failed to stop snapd.core-fixup.service: Unit snapd.core-fixup.service not loaded.
Failed to stop snapd.failure.service: Unit snapd.failure.service not loaded.
Failed to stop snapd.recovery-chooser-trigger.service: Unit snapd.recovery-chooser-trigger.service not loaded.
Failed to stop snapd.seeded.service: Unit snapd.seeded.service not loaded.
Failed to stop snapd.service: Unit snapd.service not loaded.
Failed to stop snapd.snap-repair.service: Unit snapd.snap-repair.service not loaded.
Failed to stop snapd.snap-repair.timer: Unit snapd.snap-repair.timer not loaded.
Failed to stop snapd.socket: Unit snapd.socket not loaded.
Failed to stop snapd.system-shutdown.service: Unit snapd.system-shutdown.service not loaded.
dpkg: error processing archive /var/cache/apt/archives/snapd_2.47.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 5
Errors were encountered while processing:
 /var/cache/apt/archives/snapd_2.47.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

解决方法如下:

tavi@Tavi:~$ cd /var/lib/dpkg
tavi@Tavi:~$ sudo mv info info.bak			//将旧的info文件夹备份
tavi@Tavi:~$ sudo mkdir info				//新建一个空的info文件夹
tavi@Tavi:~$ sudo apt autoremove snapd		//snaod介绍如下

snapd是新一代跨Linux发行版的软件包管理技术,支持各大主流Linux发行版,通过Linux内核安全机制保证用户数据安全,彻底解决包依赖关系相关问题,并大大简化应用软件的打包工序。snap同时为安装及管理snap包的命令行工具。
详细可参考:https://www.cnblogs.com/kylinos/p/7659882.html

GitHub 加速计划 / de / Dependencies
8.61 K
704
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:3 个月前 )
1997a400 - 2 年前
2f423539 - 2 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐