unmet dependencies && broken packages [論壇 - Ubuntu安裝問題]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊

« 1 2 3 (4) 5 »


回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 708
EXP: 83
離線
我安裝某個程式
顯示出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我嘗試安裝libcheese-gtk23 跟 libcheese7
sudo apt-get install libcheese-gtk23

Reading package lists... Done
Building dependency tree
Reading state information... Done
libcheese-gtk23 is already the newest version.
libcheese-gtk23 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

sudo apt-get install libcheese7

Reading package lists... Done
Building dependency tree
Reading state information... Done
libcheese7 is already the newest version.
libcheese7 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
------------------------------------------
執行dpkg -s libcheese-gtk23
Package: libcheese-gtk23
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 313
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: cheese
Version: 3.10.2-0ubuntu2
Depends: libc6 (>= 2.2.5), libcairo2 (>= 1.10.0), libcanberra-gtk3-0 (>= 0.25), libcheese7 (>= 3.4.0), libclutter-1.0-0 (>= 1.13.2), libclutter-gtk-1.0-0 (>= 0.91.8), libcogl15 (>= 1.15.8), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk-3-0 (>= 3.4.4), libx11-6, cheese-common (= 3.10.2-0ubuntu2)
Pre-Depends: multiarch-support
Description: tool to take pictures and videos from your webcam - widgets
A webcam application that supports image and video capture. Makes
it easy to take photos and videos of you, your friends, pets or whatever
you want. Allows you to apply fancy visual effects, fine-control image
settings and has features such as Multi-Burst mode, Countdown timer
for photos.
.
This package contains the GTK+ shared library.
Homepage: http://projects.gnome.org/cheese/
Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>


執行dpkg -s libcheese7

Package: libcheese7
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 335
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: cheese
Version: 3.10.2-0ubuntu2
Depends: libc6 (>= 2.4), libclutter-gst-2.0-0 (>= 0.10.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.0.0), libgudev-1.0-0 (>= 146), cheese-common (= 3.10.2-0ubuntu2), gstreamer1.0-clutter, gstreamer1.0-plugins-base (>= 0.11.0), gstreamer1.0-plugins-good (>= 0.11.0), gstreamer1.0-x
Pre-Depends: multiarch-support
Description: tool to take pictures and videos from your webcam - base library
A webcam application that supports image and video capture. Makes
it easy to take photos and videos of you, your friends, pets or whatever
you want. Allows you to apply fancy visual effects, fine-control image
settings and has features such as Multi-Burst mode, Countdown timer
for photos.
.
This package contains the base shared library.
Homepage: http://projects.gnome.org/cheese/
Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
--------------------------------
問題跟這個很像
http://askubuntu.com/questions/575548/system-settings-stopped-showing-up
是要照上面試試看 還有你有甚麼看法?

2016/5/22 14:38
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 34
HP : 169 / 847
MP : 574 / 18554
EXP: 89
離線
liuCC 寫到:
我安裝某個程式
顯示出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我嘗試安裝libcheese-gtk23 跟 libcheese7
sudo apt-get install libcheese-gtk23

Reading package lists... Done
Building dependency tree
Reading state information... Done
libcheese-gtk23 is already the newest version.
libcheese-gtk23 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

sudo apt-get install libcheese7

Reading package lists... Done
Building dependency tree
Reading state information... Done
libcheese7 is already the newest version.
libcheese7 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
------------------------------------------
執行dpkg -s libcheese-gtk23
Package: libcheese-gtk23
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 313
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: cheese
Version: 3.10.2-0ubuntu2
Depends: libc6 (>= 2.2.5), libcairo2 (>= 1.10.0), libcanberra-gtk3-0 (>= 0.25), libcheese7 (>= 3.4.0), libclutter-1.0-0 (>= 1.13.2), libclutter-gtk-1.0-0 (>= 0.91.8), libcogl15 (>= 1.15.8), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk-3-0 (>= 3.4.4), libx11-6, cheese-common (= 3.10.2-0ubuntu2)
Pre-Depends: multiarch-support
Description: tool to take pictures and videos from your webcam - widgets
A webcam application that supports image and video capture. Makes
it easy to take photos and videos of you, your friends, pets or whatever
you want. Allows you to apply fancy visual effects, fine-control image
settings and has features such as Multi-Burst mode, Countdown timer
for photos.
.
This package contains the GTK+ shared library.
Homepage: http://projects.gnome.org/cheese/
Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>


執行dpkg -s libcheese7

Package: libcheese7
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 335
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: cheese
Version: 3.10.2-0ubuntu2
Depends: libc6 (>= 2.4), libclutter-gst-2.0-0 (>= 0.10.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.0.0), libgudev-1.0-0 (>= 146), cheese-common (= 3.10.2-0ubuntu2), gstreamer1.0-clutter, gstreamer1.0-plugins-base (>= 0.11.0), gstreamer1.0-plugins-good (>= 0.11.0), gstreamer1.0-x
Pre-Depends: multiarch-support
Description: tool to take pictures and videos from your webcam - base library
A webcam application that supports image and video capture. Makes
it easy to take photos and videos of you, your friends, pets or whatever
you want. Allows you to apply fancy visual effects, fine-control image
settings and has features such as Multi-Burst mode, Countdown timer
for photos.
.
This package contains the base shared library.
Homepage: http://projects.gnome.org/cheese/
Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
--------------------------------
問題跟這個很像
http://askubuntu.com/questions/575548/system-settings-stopped-showing-up
是要照上面試試看 還有你有甚麼看法?



呵呵,
從上面討論的經驗,你給我這樣的訊息,
我應該無法了解哪裡出錯了,
主要我不曉得你要安裝那個軟體,而你要安裝的那個軟體是需要相依那些軟體。

要請你再回去看我之前的「回覆」,

你貼的這些訊息的產生,我在上面的回覆,已經有點出來了,

你要先確保你懂我那個回覆裡面所講的,還有把一些套件管理的概念建立起來,

否則你上面的嘗試,會讓你做白工,或是陷入五里雲霧當中,你會越弄越糊塗。


另外如何查詢某個套件相依那些套件,可以參考之前我寫的這篇「如何查詢某個套件相依哪些套件」。

以上建議


2016/5/22 15:23
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 34
HP : 169 / 847
MP : 574 / 18554
EXP: 89
離線
另外你還有要安裝什麼軟體,
勢必需要來自「/etc/apt/sources.list.d/xorg-edgers-ppa-trusty.list」這個套件庫來源嗎?

若沒有,建議先暫時停用這個套件庫來源,
這樣就不會在執行安裝套件的時候,跑出一些特別狀況的提示訊息,
而讓你迷惑了。


停用的方法,我在前面的「回覆」有說明,就不再寫一次了。

要注意的就是停用後,要再執行下面的指令就是了。


$ sudo apt-get update




2016/5/22 15:39
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 708
EXP: 83
離線
其實我也是搞不太懂
明明查詢出來的libcheese7跟libcheese-gtk23版本都是3.10.2-0ubuntu2
應該有符合The following packages have unmet dependencies:
unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
的吧(還是我搞錯了..)
--------------------
我要安裝的事cuda toolkit7-5 這個安裝下去沒問題
還要再安裝cuda 但就是這個出現上面所描述的問題
-----------------------
你所提到的(以下)
另外你還有要安裝什麼軟體,
勢必需要來自「/etc/apt/sources.list.d/xorg-edgers-ppa-trusty.list」這個套件庫來源嗎?

若沒有,建議先暫時停用這個套件庫來源,
這樣就不會在執行安裝套件的時候,跑出一些特別狀況的提示訊息,
而讓你迷惑了。

我試過將那些資料個別停用
再式者安裝cuda 但是卻顯示出
The following packages have unmet dependencies:
cuda : Depends: cuda-7-5 (= 7.5-18) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
所以我最後還是復原了
------------------------
我查詢過cuda相依哪些軟體
http://samwhelp.github.io/book-ubuntu-basic-skill/book/content/package/how-to-find-out-package-dependency.html
但發現每查一個就多了更多相依的軟體
但仍看不道libcheese7跟libcheese-gtk23這兩個相關
所以放棄了
其實你再#26的最後就有顯示出跟我目前一樣的狀況(雖然式安裝不同的東西)
-------------------------
最後最後
其實我大概了解軟體彼此之間的相依
但是...
我還是搞不懂要該如何解決..
還是我要嘗試安裝比較舊一點的版本?

2016/5/22 16:50
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 34
HP : 169 / 847
MP : 574 / 18554
EXP: 89
離線
liuCC 寫到:

--------------------
我要安裝的事cuda toolkit7-5 這個安裝下去沒問題
還要再安裝cuda 但就是這個出現上面所描述的問題
-----------------------
...略....

我試過將那些資料個別停用
再式者安裝cuda 但是卻顯示出
The following packages have unmet dependencies:
cuda : Depends: cuda-7-5 (= 7.5-18) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

-------------------------
...略....



我想先確認一件事,你上面說的,
*「cuda toolkit7-5」
*「cuda」

這兩個套件我找不到,
我有加入你之前「回覆」說的那兩個套件庫來源。


$ sudo add-apt-repository ppa:xorg-edgers/ppa
$ sudo add-apt-repository ppa:graphics-drivers/ppa



一樣找不到。

然後不管有沒有加入上面兩個套件庫來源,

我只有找到下面兩個套件

* nvidia-cuda-toolkit
* nvidia-cuda-dev


所以想要跟你確認,你說的「cuda」是怎麼跑出來的?

你還有加入什麼額外的套件庫來源,或是直接下載「deb檔」來安裝的嗎?

請再詳述一下你執行的步驟,這樣我比較有線索可以重現你遇到的狀況


2016/5/22 17:41
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 708
EXP: 83
離線
我是從官方網站下載的
https://developer.nvidia.com/cuda-downloads
也是參照上面的安裝過程
應該沒再安裝甚麼其他的套件了
麻煩你幫我測試看看

2016/5/22 19:04
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 708
EXP: 83
離線
$ sudo add-apt-repository ppa:xorg-edgers/ppa
$ sudo add-apt-repository ppa:graphics-drivers/ppa
這兩個套件只是為了解決雙顯卡做切換而安裝的
與cuda應該並沒有直接性的關係

2016/5/22 19:23
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 34
HP : 169 / 847
MP : 574 / 18554
EXP: 89
離線
經過測試,我大概懂問題的根源了,
我先講結論,後面我再陸續補上我發現到的。

我的建議,就是準備一個乾淨的「Ubuntu.14.04.4」

然後先「不要」加入下面這兩個套件庫來源


$ sudo add-apt-repository ppa:xorg-edgers/ppa
$ sudo add-apt-repository ppa:graphics-drivers/ppa



因為當你加入上面兩個套件庫來源,
然後你又執行


$ sudo apt-get update
$ sudo apt-get dist-upgrade



就會更新一些套件,是來自於這兩個套件庫來源(註: 我測試的時候一開始只有加入ppa:xorg-edgers/ppa,所以我不確定ppa:graphics-drivers/ppa)

而更新後的這些套件的版本,會讓你要安裝某些套件的時候,導致相依性卡住了,所以就老是出現你看到的問題。


## 安裝 cuda

到「官網下載頁面

做以下的選擇

Operating System : Linux
Architecture : x86_64
Distribution : Ubuntu
Version : 14.04
Installer Type : deb (network)


最後一個「Installer Type」有三種可以選,這裡選「deb(network)」來當作範例說明,
後面我會說明「deb(local)」和「deb(network)」的不同之處


做上面的選擇後,可以得到一個網址

http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb

執行下面指令來下載


$ wget -c http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb



執行


$ md5sum cuda-repo-ubuntu1404_7.5-18_amd64.deb



顯示


e810ded23efe35e3db63d2a92288f922 cuda-repo-ubuntu1404_7.5-18_amd64.deb



然後對照「網頁」上的「cuda-repo-ubuntu1404_7.5-18_amd64.deb (md5sum: e810ded23efe35e3db63d2a92288f922)」是一致的

執行下面指令來安裝


$ sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb



這個套件,只是幫你把「cuda」的套件庫來源安裝好而已,後面我會分析說明。

然後執行


$ sudo apt-get update



更新套件庫的套件資訊

最後執行下面的指令安裝「cuda」


$ sudo apt-get install cuda




我測試過,是可以安裝成功的,

不過相關的deb檔,加起來的檔案大小,還蠻大的,所以耐心等待下載吧





另外你前面「回覆」提到的「這篇」,
問題的根源,指的應該是一樣的,
只不過裡面提到的方法(使用ppa-purge來復原)我還沒嘗試,
我是直接用一個新的環境來測試安裝「cuda」。

待續...

2016/5/23 4:25
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 34
HP : 169 / 847
MP : 574 / 18554
EXP: 89
離線
一開始我測試安裝「cuda」的時候,
是從之前「回覆」的環境來測試,

也就是在我有執行下面的指令之後的環境來安裝「cuda」。


$ sudo add-apt-repository ppa:xorg-edgers/ppa -y
$ sudo apt-get update;
$ sudo apt-get dist-upgrade;



結果就會像樓主提的,會出現一些不能安裝的訊息。

而我使用「apt-get debug dependencies」當關鍵字查詢,
查到「一篇的討論」,
然後使用裡面提到的技巧來找線索。


### 技巧一

執行


$ sudo apt-get -s -o Debug::pkgProblemResolver=yes install cuda



顯示


Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 2
Starting 2 pkgProblemResolver with broken count: 2
Investigating (0) libgl1-mesa-dev [ amd64 ] < none -> 10.1.3-0ubuntu0.6 > ( libdevel )
Broken libgl1-mesa-dev:amd64 Depends on libdrm-dev [ amd64 ] < none -> 2.4.64-1~ubuntu14.04.1 > ( libdevel ) (>= 2.4.52)
Considering libdrm-dev:amd64 0 as a solution to libgl1-mesa-dev:amd64 1
Holding Back libgl1-mesa-dev:amd64 rather than change libdrm-dev:amd64
Investigating (0) libglu1-mesa-dev [ amd64 ] < none -> 9.0.0-2 > ( libdevel )
Broken libglu1-mesa-dev:amd64 Depends on libgl1-mesa-dev [ amd64 ] < none -> 10.1.3-0ubuntu0.6 > ( libdevel )
Considering libgl1-mesa-dev:amd64 1 as a solution to libglu1-mesa-dev:amd64 1
Holding Back libglu1-mesa-dev:amd64 rather than change libgl1-mesa-dev:amd64
Broken libglu1-mesa-dev:amd64 Depends on libgl-dev [ amd64 ] < none > ( none )
Considering libgl1-mesa-dev-lts-wily:amd64 0 as a solution to libglu1-mesa-dev:amd64 1
Holding Back libglu1-mesa-dev:amd64 rather than change libgl-dev:amd64
Or group keep for libglu1-mesa-dev:amd64
Investigating (0) freeglut3-dev [ amd64 ] < none -> 2.8.1-1 > ( libdevel )
Broken freeglut3-dev:amd64 Depends on libgl1-mesa-dev [ amd64 ] < none -> 10.1.3-0ubuntu0.6 > ( libdevel )
Considering libgl1-mesa-dev:amd64 1 as a solution to freeglut3-dev:amd64 0
Holding Back freeglut3-dev:amd64 rather than change libgl1-mesa-dev:amd64
Broken freeglut3-dev:amd64 Depends on libgl-dev [ amd64 ] < none > ( none )
Considering libgl1-mesa-dev-lts-wily:amd64 0 as a solution to freeglut3-dev:amd64 0
Holding Back freeglut3-dev:amd64 rather than change libgl-dev:amd64
Or group keep for freeglut3-dev:amd64
Broken freeglut3-dev:amd64 Depends on libglu1-mesa-dev [ amd64 ] < none -> 9.0.0-2 > ( libdevel )
Considering libglu1-mesa-dev:amd64 1 as a solution to freeglut3-dev:amd64 0
Holding Back freeglut3-dev:amd64 rather than change libglu1-mesa-dev:amd64
Broken freeglut3-dev:amd64 Depends on libglu-dev [ amd64 ] < none > ( none )
Considering libglu1-mesa-dev:amd64 1 as a solution to freeglut3-dev:amd64 0
Holding Back freeglut3-dev:amd64 rather than change libglu-dev:amd64
Or group keep for freeglut3-dev:amd64
Investigating (0) mesa-common-dev [ amd64 ] < none -> 10.1.3-0ubuntu0.6 > ( devel )
Broken mesa-common-dev:amd64 Depends on libdrm-dev [ amd64 ] < none -> 2.4.64-1~ubuntu14.04.1 > ( libdevel ) (>= 2.4.52)
Considering libdrm-dev:amd64 0 as a solution to mesa-common-dev:amd64 -1
Holding Back mesa-common-dev:amd64 rather than change libdrm-dev:amd64
Investigating (0) cuda-samples-7-5 [ amd64 ] < none -> 7.5-18 > ( devel )
Broken cuda-samples-7-5:amd64 Depends on freeglut3-dev [ amd64 ] < none -> 2.8.1-1 > ( libdevel )
Considering freeglut3-dev:amd64 0 as a solution to cuda-samples-7-5:amd64 -1
Holding Back cuda-samples-7-5:amd64 rather than change freeglut3-dev:amd64
Investigating (1) cuda-toolkit-7-5 [ amd64 ] < none -> 7.5-18 > ( devel )
Broken cuda-toolkit-7-5:amd64 Depends on cuda-samples-7-5 [ amd64 ] < none -> 7.5-18 > ( devel ) (= 7.5-18)
Considering cuda-samples-7-5:amd64 -1 as a solution to cuda-toolkit-7-5:amd64 -1
Holding Back cuda-toolkit-7-5:amd64 rather than change cuda-samples-7-5:amd64
Investigating (1) cuda-documentation-7-5 [ amd64 ] < none -> 7.5-18 > ( devel )
Broken cuda-documentation-7-5:amd64 Depends on cuda-samples-7-5 [ amd64 ] < none -> 7.5-18 > ( devel ) (= 7.5-18)
Considering cuda-samples-7-5:amd64 -1 as a solution to cuda-documentation-7-5:amd64 -1
Holding Back cuda-documentation-7-5:amd64 rather than change cuda-samples-7-5:amd64
Investigating (1) cuda-7-5 [ amd64 ] < none -> 7.5-18 > ( devel )
Broken cuda-7-5:amd64 Depends on cuda-toolkit-7-5 [ amd64 ] < none -> 7.5-18 > ( devel ) (= 7.5-18)
Considering cuda-toolkit-7-5:amd64 -1 as a solution to cuda-7-5:amd64 -1
Holding Back cuda-7-5:amd64 rather than change cuda-toolkit-7-5:amd64
Investigating (2) cuda [ amd64 ] < none -> 7.5-18 > ( devel )
Broken cuda:amd64 Depends on cuda-7-5 [ amd64 ] < none -> 7.5-18 > ( devel ) (= 7.5-18)
Considering cuda-7-5:amd64 -1 as a solution to cuda:amd64 9999
Reinst Failed early because of libdrm2:amd64
Reinst Failed because of libdrm-dev:amd64
Reinst Failed because of mesa-common-dev:amd64
Reinst Failed because of libgl1-mesa-dev:amd64
Reinst Failed because of libdrm-dev:amd64
Reinst Failed because of mesa-common-dev-lts-wily:amd64
Reinst Failed because of libgl1-mesa-dev-lts-wily:amd64
Reinst Failed because of freeglut3-dev:amd64
Reinst Failed because of cuda-samples-7-5:amd64
Reinst Failed because of cuda-toolkit-7-5:amd64
Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
cuda : Depends: cuda-7-5 (= 7.5-18) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.




### 技巧二

先安裝「aptitude


$ sudo apt-get install aptitude



然後執行


$ echo q | sudo aptitude -s install cuda




顯示


The following NEW packages will be installed:
bbswitch-dkms{a} build-essential{a}
ca-certificates-java{a} cuda cuda-7-5{a}
cuda-command-line-tools-7-5{a} cuda-core-7-5{a}
cuda-cublas-7-5{a} cuda-cublas-dev-7-5{a}
cuda-cudart-7-5{a} cuda-cudart-dev-7-5{a}
cuda-cufft-7-5{a} cuda-cufft-dev-7-5{a}
cuda-curand-7-5{a} cuda-curand-dev-7-5{a}
cuda-cusolver-7-5{a} cuda-cusolver-dev-7-5{a}
cuda-cusparse-7-5{a} cuda-cusparse-dev-7-5{a}
cuda-documentation-7-5{a} cuda-driver-dev-7-5{a}
cuda-drivers{a} cuda-license-7-5{a}
cuda-misc-headers-7-5{a} cuda-npp-7-5{a}
cuda-npp-dev-7-5{a} cuda-nvrtc-7-5{a}
cuda-nvrtc-dev-7-5{a} cuda-runtime-7-5{a}
cuda-samples-7-5{a} cuda-toolkit-7-5{a}
cuda-visual-tools-7-5{a} default-jre{a}
default-jre-headless{a} dkms{a} dpkg-dev{a} fakeroot{a}
fonts-dejavu-extra{a} freeglut3{a} freeglut3-dev{a}
g++{a} g++-4.8{a} java-common{a} lib32gcc1{a}
libalgorithm-diff-perl{a} libalgorithm-diff-xs-perl{a}
libalgorithm-merge-perl{a} libatk-wrapper-java{a}
libatk-wrapper-java-jni{a} libbonobo2-0{a}
libbonobo2-common{a} libc6-i386{a} libcuda1-352{a}
libdrm-dev{ab} libfakeroot{a} libgconf2-4{a} libgif4{a}
libgl1-mesa-dev{a} libglu1-mesa-dev{a} libgnome2-0{a}
libgnome2-bin{a} libgnome2-common{a} libgnomevfs2-0{a}
libgnomevfs2-common{a} libice-dev{a} libidl-common{a}
libidl0{a} libjansson4{a} liborbit-2-0{a} liborbit2{a}
libpthread-stubs0-dev{a} libsctp1{a} libsm-dev{a}
libstdc++-4.8-dev{a} libvdpau1{a} libx11-dev{a}
libx11-doc{a} libx11-xcb-dev{a} libxau-dev{a}
libxcb-dri2-0-dev{a} libxcb-dri3-dev{a}
libxcb-glx0-dev{a} libxcb-present-dev{a}
libxcb-randr0-dev{a} libxcb-render0-dev{a}
libxcb-shape0-dev{a} libxcb-sync-dev{a}
libxcb-xfixes0-dev{a} libxcb1-dev{a} libxdamage-dev{a}
libxdmcp-dev{a} libxext-dev{a} libxfixes-dev{a}
libxi-dev{a} libxmu-dev{a} libxmu-headers{a}
libxnvctrl0{a} libxshmfence-dev{a} libxt-dev{a}
libxxf86vm-dev{a} lksctp-tools{a} mesa-common-dev{a}
nvidia-352{a} nvidia-352-dev{a} nvidia-352-uvm{a}
nvidia-modprobe{a} nvidia-opencl-icd-352{a}
nvidia-prime{a} nvidia-settings{a} ocl-icd-libopencl1{a}
openjdk-7-jre{a} openjdk-7-jre-headless{a}
screen-resolution-extra{a} tzdata-java{a}
x11proto-core-dev{a} x11proto-damage-dev{a}
x11proto-dri2-dev{a} x11proto-fixes-dev{a}
x11proto-gl-dev{a} x11proto-input-dev{a}
x11proto-kb-dev{a} x11proto-xext-dev{a}
x11proto-xf86vidmode-dev{a} xorg-sgml-doctools{a}
xtrans-dev{a}
0 packages upgraded, 125 newly installed, 0 to remove and 0 not upgraded.
Need to get 147 MB/1,185 MB of archives. After unpacking 2,198 MB will be used.
The following packages have unmet dependencies:
libdrm-dev : Depends: libdrm2 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-intel1 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-radeon1 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-nouveau2 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-amdgpu1 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
The following actions will resolve these dependencies:

Keep the following packages at their current version:
1) cuda [Not Installed]
2) cuda-7-5 [Not Installed]
3) cuda-documentation-7-5 [Not Installed]
4) cuda-samples-7-5 [Not Installed]
5) cuda-toolkit-7-5 [Not Installed]
6) freeglut3-dev [Not Installed]
7) libdrm-dev [Not Installed]
8) libgl1-mesa-dev [Not Installed]
9) libglu1-mesa-dev [Not Installed]
10) mesa-common-dev [Not Installed]



Accept this solution? [Y/n/q/?] Abandoning all efforts to resolve these dependencies.
Abort.




### 後續探索

然後你就可以根據上面的一些套件關鍵字,來研究到底那裡卡住了


主要你可以看到上有一段



The following packages have unmet dependencies:
libdrm-dev : Depends: libdrm2 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-intel1 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-radeon1 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-nouveau2 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty is installed.
Depends: libdrm-amdgpu1 (= 2.4.64-1~ubuntu14.04.1) but 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty




預計要安裝「libdrm-dev」這個套件,
但因為相依套件「libdrm2 (= 2.4.64-1~ubuntu14.04.1) 」
不過系統已經安裝「2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty」
所以無法安裝「libdrm-dev」這個套件。

你可以執行下面指令觀察


$ apt-cache policy libdrm2



顯示


libdrm2:
Installed: 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty
Candidate: 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty
Version table:
*** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
2.4.64-1~ubuntu14.04.1 0
500 http://tw.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
2.4.56-1~ubuntu2 0
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
2.4.52-1 0
500 http://tw.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages




你可以看到「libdrm2: *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0」是來自「500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/ trusty/main amd64 Packages」



*** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status




執行


$ apt-cache policy libdrm-intel1



顯示


libdrm-intel1:
Installed: 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty
Candidate: 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty
Version table:
*** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
2.4.64-1~ubuntu14.04.1 0
500 http://tw.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
2.4.56-1~ubuntu2 0
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
2.4.52-1 0
500 http://tw.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages




你可以看到「libdrm-intel1: *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0」是來自「500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/ trusty/main amd64 Packages」


*** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status





所以就呼應我前一個「回覆」講的「而更新後的這些套件的版本,會讓你要安裝某些套件的時候,導致相依性卡住了,所以就老是出現你看到的問題。」


待續...

2016/5/23 5:14
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 34
HP : 169 / 847
MP : 574 / 18554
EXP: 89
離線
安裝cuda的問題,上面兩個回覆,已經講完了。

接下來提的,剛好趁這個案例,可以提一些技巧,說明如何來探索套件。



接續前面「回覆」提到的

## Install Type

最後的「Installer Type」

會分為三種

* runfile (local)
* deb (local)
* deb (network)

## 檔案網址

然後就可以找到三個檔案網址

* http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run
* http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
* http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb

## md5sum

* cuda-repo-ubuntu1404_7.5-18_amd64.deb (md5sum: e810ded23efe35e3db63d2a92288f922)
* cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb (md5sum: 5cf65b8139d70270d9234d5ff4d697c7)
* cuda_7.5.18_linux.run (md5sum: 4b3bcecf0dfc35928a0898793cf3e4c6)


## Installation Instructions:

### runfile (local)


Installation Instructions:

Run `sudo sh cuda_7.5.18_linux.run`
Follow the command-line prompts



### deb (local)


Installation Instructions:

`sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb`
`sudo apt-get update`
`sudo apt-get install cuda`




### deb (network)


Installation Instructions:

`sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb`
`sudo apt-get update`
`sudo apt-get install cuda`




接下來要分析「deb (local)」和「deb (network)」,也就是「cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb」和「cuda-repo-ubuntu1404_7.5-18_amd64.deb」

待續...

2016/5/23 5:21
應用擴展 工具箱

« 1 2 3 (4) 5 »

 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.