一、環境介紹
Ubuntu 16.04
搜狗輸入法: sogoupinyin_2.0.0.0078_amd64
二、問題表現
sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb
錯誤信息如下:
sogoupinyin : Depends: libopencc2 but it is not installable or libopencc1 but it is not going to be installed Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed Recommends: fonts-droid-fallback but it is not going to be installed or fonts-droid but it is not installable E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
一看就知道是依賴包存在問題
三、問題分析
之前在Ubuntu 15.10的版本之時,使用同樣的sogou版本,不存在此類的問題。 但是在Ubuntu 16.04中,卻存在此類問題,說明Ubuntu升級之后,sogou輸入法并未做相應的系統兼容性測試, 故起最高的Ubuntu支持版本時15.10.
雖然我們知道了問題,但是該如何解決呢?
基于錯誤信息,我們發現起依賴包有以下幾個: libopencc1 libopencc2, fcitx-libs, fcitx-libs-qt font-droid-fallback.
四、試錯分析
試錯1:
bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs 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: sogoupinyin : Depends: libopencc2 but it is not installable or libopencc1 but it is not going to be installed Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed Recommends: fonts-droid-fallback but it is not going to be installed or fonts-droid but it is not installable E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
試錯2:
bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qt 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: sogoupinyin : Depends: libopencc2 but it is not installable or libopencc1 but it is not going to be installed Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed Recommends: fonts-droid-fallback but it is not going to be installed or fonts-droid but it is not installable E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
試錯3:
bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qt fcitx-libs 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: sogoupinyin : Depends: libopencc2 but it is not installable or libopencc1 but it is not going to be installed Recommends: fonts-droid-fallback but it is not going to be installed or fonts-droid but it is not installable E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
新聞熱點
疑難解答