Ubuntu16.04安裝軟件時錯誤: adwaita-icon-theme : Depends: libgtk-3-bin but it is not going to be installed

問題描述

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 adwaita-icon-theme : Depends: libgtk-3-bin but it is not going to be installed
 gnupg-agent : Depends: pinentry-curses but it is not going to be installed or
                        pinentry
               Depends: libassuan0 (>= 2.3.0) but it is not going to be installed
               Depends: libnpth0 (>= 0.90) but it is not going to be installed
 software-properties-common : Depends: python3:any (>= 3.3.2-2~)
                              Depends: python3 but it is not going to be installed
                              Depends: python3-gi but it is not going to be installed
                              Depends: gir1.2-glib-2.0 but it is not going to be installed
                              Depends: python-apt-common (>= 0.9) but it is not going to be installed
                              Depends: python3-dbus but it is not going to be installed
                              Depends: python3-software-properties (= 0.96.20.9) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

一如既往的百度,然後證明下面的方法並不能行得通:

sudo apt-get update
sudo apt-get autoremove

......

查閱了很多資料還是沒有解決,然後也google了,說問題不大,可是每次安裝包都會跳出這個問題,導致後續無法安裝.

 

看了好幾次這個解決方法(https://segmentfault.com/q/1010000007976352/a-1020000007976874),但就是沒有解決.

 2

自己使用sudo rm 每個需要override的文件解決了

— Kiong_yo · 2016-12-31 

上述這個方法倒也不是沒有用過,只不過之前刪除錯了文件,導致也沒運行成功.

然後,我嘗試了刪除下面的包

sudo rm /usr/sbin/update-icon-caches.gtk2 

但是又報出一個新的錯誤:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libgtk-3-bin
The following NEW packages will be installed:
  libgtk-3-bin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
176 not fully installed or removed.
Need to get 0 B/53.7 kB of archives.
After this operation, 290 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 21123 files and directories currently installed.)
Preparing to unpack .../libgtk-3-bin_3.18.9-1ubuntu3.3_amd64.deb ...
Adding 'diversion of /usr/sbin/update-icon-caches to /usr/sbin/update-icon-caches.gtk2 by libgtk-3-bin'
Adding 'diversion of /usr/share/man/man8/update-icon-caches.8.gz to /usr/share/man/man8/update-icon-caches.gtk2.8.gz by libgtk-3-bin'
dpkg-divert: error: rename involves overwriting '/usr/share/man/man8/update-icon-caches.gtk2.8.gz' with
  different file '/usr/share/man/man8/update-icon-caches.8.gz', not allowed
dpkg: error processing archive /var/cache/apt/archives/libgtk-3-bin_3.18.9-1ubuntu3.3_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libgtk-3-bin_3.18.9-1ubuntu3.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

接着我又繼續刪除(其實心裏還是很虛的,萬一刪着刪着系統崩了咋辦),但如果不做就沒辦法做後面的工作,因此又繼續刪除:

sudo rm /usr/share/man/man8/update-icon-caches.gtk2.8.gz 

沒想到就這樣就可以了:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libgtk-3-bin
The following NEW packages will be installed:
  libgtk-3-bin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
176 not fully installed or removed.
Need to get 0 B/53.7 kB of archives.
After this operation, 290 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 21125 files and directories currently installed.)
Preparing to unpack .../libgtk-3-bin_3.18.9-1ubuntu3.3_amd64.deb ...
Leaving 'diversion of /usr/sbin/update-icon-caches to /usr/sbin/update-icon-caches.gtk2 by libgtk-3-bin'
Adding 'diversion of /usr/share/man/man8/update-icon-caches.8.gz to /usr/share/man/man8/update-icon-caches.gtk2.8.gz by libgtk-3-bin'
Unpacking libgtk-3-bin (3.18.9-1ubuntu3.3) ...
Setting up libkmod2:amd64 (22-1ubuntu5.2) ...
Setting up libncurses5:amd64 (6.0+20160213-1ubuntu1) ...
Setting up libprocps4:amd64 (2:3.3.10-4ubuntu2.4) ...
Setting up insserv (1.14.0-5ubuntu3) ...
Setting up sysv-rc (2.88dsf-59.3ubuntu2) ...
Setting up initscripts (2.88dsf-59.3ubuntu2) ...
Setting up procps (2:3.3.10-4ubuntu2.4) ...
update-alternatives: warning: /etc/alternatives/w has been changed (manually or by a script); switching to manual updates only
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up libglib2.0-0:amd64 (2.48.2-0ubuntu4.4) ...
No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
Setting up libdbus-1-3:amd64 (1.10.6-1ubuntu3.4) ...
Setting up libnih1:amd64 (1.0.3-4.3ubuntu1) ...
Setting up libnih-dbus1:amd64 (1.0.3-4.3ubuntu1) ...
Setting up libcgmanager0:amd64 (0.39-2ubuntu5) ...
Setting up cgmanager (0.39-2ubuntu5) ...
Setting up systemd-shim (9-1bzr4ubuntu1) ...
Setting up libapparmor1:amd64 (2.10.95-0ubuntu2.11) ...

中間要求選擇是否安裝新的,選擇Y就行了.

 

記錄一下,萬一以後再遇到.同時也希望能夠對你有一點點幫助.

發佈了27 篇原創文章 · 獲贊 26 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章