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 / 1527
EXP: 83
離線
在安裝程式的時候出現了這兩句話
The following packages have unmet dependencies:
Unable to correct problems, you have held broken packages
我查過網路上也有相同問題的人
它們有用
sudo apt-get clean &&sudo apt-get upgrade
或是更改成us的來源
sudo apt-get upgrade也都是過
皆無法解決
不知道哪位神人可以幫忙想個辦法
謝謝
ps若有需要可以貼上測試的截圖供參考

2016/5/18 22:34
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 1527
EXP: 83
離線
版本是14.04
附上指令截圖

附件:



png  Screenshot from 2016-05-18 22_24_36.png (254.85 KB)
45876_573c8bfde7388.png 1920X1080 px

2016/5/18 23:36
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
看來是你的套件相依卡住了,因為我也很少遇到這種情形,
所以也不是很清楚要怎麼處理,我通常都是見招拆招,
不見得能解決您遇到的狀況,
但可以先嘗試了解您目前系統的狀態。


您可以先執行,(下面指令選擇其中一種方式就行了)


$ dpkg --get-selections | grep hold



或是執行


$ apt-mark showhold



或是執行


$ cat /var/lib/dpkg/status | grep 'Status: hold' -B 1



先看看那些套件被 hold 住,
再來決定要怎麼處理吧

Orz...

另外您有加入什麼特別的套件庫來源嗎?
可以看「/etc/apt/sources.list.d/*」和「/etc/apt/sources.list」

## 相關 manpages (以下紀錄參考用)

$ man dpkg

可以先閱讀「states, selection states and flags」那一段上下文。

$ man apt-mark


$ man apt-get

2016/5/19 1:07
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 1527
EXP: 83
離線
我用了上面的指令
不過都沒有東西(如附圖)
附圖2則是那個文件的內容
至於manpages我還沒看
晚點試試看

附件:



png  Screenshot from 2016-05-19 09_50_13.png (262.67 KB)
45876_573d27184373b.png 1920X1080 px

png  Screenshot from 2016-05-19 09_50_45.png (253.90 KB)
45876_573d2723cda5a.png 1920X1080 px

2016/5/19 10:38
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 1527
EXP: 83
離線
samwhelp你好
若執行你給的這條指令
sudo /etc/apt/sources.list.d/*
顯示出某個東西(之前安裝過的東西)command not found
請問是甚麼意思? 還有該如何解決
麻煩你了 謝謝

2016/5/19 23:59
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
liuCC 寫到:
samwhelp你好
若執行你給的這條指令
sudo /etc/apt/sources.list.d/*
顯示出某個東西(之前安裝過的東西)command not found
請問是甚麼意思? 還有該如何解決
麻煩你了 謝謝


我應該沒給你這個指令,你可能誤會我的意思了

「/etc/apt/sources.list.d/」是一個資料夾,

你可以執行下面的指令,觀看裡面有沒有檔案


$ ls /etc/apt/sources.list.d/



「/etc/apt/sources.list.d/」這裡面的檔案的作用,
跟「/etc/apt/sources.list」這個檔功用是一樣的,
只是被拆成不同的檔案。
相關的概念可以參考「這篇」和「這篇」。

會請你看「/etc/apt/sources.list.d/」這裡有沒有其他的檔,
是想說,要不要先把其他額外加入的套件庫來源先停用。
然後再執行


$ sudo apt-get update



重新獲取套件資訊。


另外關於你提這個問題,我很少遇到,
雖然我昨天有利用你給的關鍵字,有找到一些資料,有看到一些解法
我還沒研究透澈,主要是無法重現你提的那個狀況,所以我無法確定那個方法有效,
所以我也不曉得該怎麼給你下一步有效的指令,
我能想到的,等會我整理一些我找到的資料,貼給你參考。
另外關於套件的問題,以前其實「有討論過很多」,我有去翻我之前參與討論的案例「這裡」和「這裡」,
主要就是找出卡住套件相依的關鍵處,
不過我目前也沒啥頭緒,提供你明確有效的方法和步驟,來解決你遇到的問題,真的抱歉。
只能靠你自己嘗試了,可以參考等會我貼的一些連結,有可能有些你已經看過了。


另外我有稍微看了一下程式碼,是有找到幾個你貼出來提示訊息的點,
不過我還沒真的看懂程式碼的流程。
若你真的要研究程式碼,可以執行下面的指令。


$ apt-get source apt



不過這可能扯太遠了,這是我自己本來預定要研究的議題


2016/5/20 0:31
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
我使用「The following packages have unmet dependencies:」當關鍵字查詢,

有查到「一篇討論」,應該是第一篇,
這篇裡面有一個回覆,講的很詳細,也就是左方有綠色勾勾那個回覆,

中間有一段,那部份應該有一些解法,


One of the most basic fixes to resolve dependencies problems is to run:
...
Next solution is to run:
...


我猜這篇你應該是有看過,你可以再研究看看他的方法。

=====================================================================

另外我用「Unable to correct problems, you have held broken packages」當關鍵字查詢,

也查到幾篇相關的討論

* http://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages

裡面提到


$ sudo apt-get install -f



這個用法通常是用在若你自己下載套件下來安裝,這個套件有相依一些套件,是你沒事先安裝的,
就可以執行這個指令,這樣就會事後安裝相依的套件,可以參考這個「案例」。

然後,下面這個指令你有執行過了,你上面的圖有,不過我雖然知道這個指令,不過我還沒認真去研究他的功用


$ sudo dpkg --configure -a




* https://www.quora.com/Im-trying-to-install-packages-in-Ubuntu-14-04-LTS-but-it-shows-me-error-E-Unable-to-correct-problems-you-have-held-broken-packages-How-can-I-solve-this-problem


這篇有提到找被hold的套件
* http://ubuntuforums.org/showthread.php?t=2113213

這篇有提到是說找到被hold的套件,把那些套件移除。
https://klee1611.wordpress.com/2016/02/22/e-unable-to-correct-problems-you-have-held-broken-packages/


這篇有提到使用「aptitude why-not」,在一些討論,也會提到使用「aptitude」,
以前討論,也有人提到使用這個指令,是可以解決問題的,
不過目前你的系統不知道還能不能安裝新套件,預設這個套件是沒有安裝的。
http://unix.stackexchange.com/questions/121149/fix-held-broken-packages-on-debian

=======================================================================

我用「pkgproblemresolver」當關鍵字查詢

* http://askubuntu.com/questions/124845/eerror-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-hel

這篇有提到,可以在下面兩個資料夾,找到log

* /var/log/dist-upgrade/
* /var/log/apt/

我目前測試,是有找到兩個log檔

* /var/log/apt/term.log
* /var/log/apt/history.log


我的環境是「Xubuntu 16.04 64位元」。


這篇也提到了一開始講的那篇。
http://askubuntu.com/questions/382298/e-error-pkgproblemresolverresolve-generated-breaks-while-uninstalling-mono

=======================================================================

另外有幾個指令你可研究的,如何了解套件資訊的

執行


$ dpkg -s libgbm1



上面這個主要可以看到「Status:」這個欄位,基本上可以在「/var/lib/dpkg/status」找到。


執行


$ apt-cache policy libgbm1



執行


$ apt-cache show libgbm1



套件庫的套件資訊,則是放在「/var/lib/apt/lists/」

=======================================================================

另外我在「apt-get

有看到一個參數「--ignore-hold」,以下是摘要說明


--ignore-hold
Ignore package holds; this causes apt-get to ignore a hold placed
on a package. This may be useful in conjunction with dist-upgrade
to override a large number of undesired holds. Configuration Item:
APT::Ignore-Hold.


這個參數我沒用過,所以不曉得他的功用是啥,我有在程式碼稍微瞄到這段,不過我也還沒看懂程式碼,
樓主也許你可以嘗試看看這個參數是否有效,我這邊目前無法確認。


=======================================================================


以上粗略的報告,盼能給樓主您一些線索找到答案,
或是對這部份有深入研究的人,可以來參與討論,
我還學藝不精,有些東西我也是一知半解,樓主歹勢拉。

Orz...

不過可以繼續討論,有啥新發現,就貼出來,慢慢答案應該就會浮現了。


2016/5/20 1:30
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 1527
EXP: 83
離線
很感謝你的回復
雖然我還沒讀完(會儘快了解)

http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa
其中我有測試過一些東西
但是還是沒有辦法
過程中有些東西比較印象深刻
提供給你 不知道可否有幫助

執行 sudo apt-get -u dist-upgrade 後
顯示出了一個東西
libgbm1 <-這我也不清楚是甚麼
他無法upgrade
我有嘗試 sudo apt-get install libgbm1也無法使用(忘了截圖)

之後我參考這篇
http://askubuntu.com/questions/595400/unmet-dependencies-cannot-remove-package-libgbm1
用sudo dpkg --force-all -P libgbm1 將他移掉
其中他有說This command may damage your system, so you should watch it. And try to fix:
sudo apt-get -f install.(看來我好像要中獎了...)
之後用apt-get -f install也無法(也忘了截圖 顯示內容應該跟下面一樣)
用 sudo apt-get update && sudo apt-get upgrade
就顯示出:
-----------------------------------------------------------
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libcogl15 : Depends: libgbm1 (>= 8.1~0) but it is not installed
libqt5gui5 : Depends: libgbm1 (>= 8.1~0) but it is not installed
E: Unmet dependencies. Try using -f.
-----------------------------------------------------------
再用 apt-get -f install
顯示出:
-----------------------------------------------------------
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libcogl15 : Depends: libgbm1 (>= 8.1~0) but it is not installed
libqt5gui5 : Depends: libgbm1 (>= 8.1~0) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
-----------------------------------------------------------
這時候有注意到右上角多了一個紅色禁止的符號
裡面顯示出:
–----------------------------------------------------------
An error occurred,please run Package Manager from the right-click menu or apt-get in a terminal to see what is wrong.
The error message was:'Error:BrokenCount>0'.This usually means that your installed packages have unmet dependencies
-----------------------------------------------------------
我點選Show updates
但沒過多久就顯示出The application Software Updater has closed unexpectedly
–----------------------------------------------------------
以上是目前的狀況(感覺動到了系統 離重灌不遠了...)
等等再試試看其他方式
若有何建議 我會試試看的
謝謝

2016/5/20 16:14
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員一級
註冊日期:
2016/5/18 17:50
所屬群組:
已註冊使用者
等級: 3
HP : 0 / 70
MP : 8 / 1527
EXP: 83
離線
我嘗試用
https://klee1611.wordpress.com/2016/02/22/e-unable-to-correct-problems-you-have-held-broken-packages/
來解決問題

可惜
sudo apt-mark showhold
並未顯示出任何東西
變參照
If apt-mark showhold prints nothing,
try this solution.
輸入了
sudo apt-get install aptitude
並顯示出
-------------------------------------
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:
aptitude : Depends: aptitude-common (= 0.6.8.2-1ubuntu4) but it is not going to be installed
Depends: libboost-iostreams1.54.0 but it is not going to be installed
Depends: libcwidget3 but it is not going to be installed
Depends: libept1.4.12 but it is not going to be installed
libcogl15 : Depends: libgbm1 (>= 8.1~0) but it is not going to be installed
libqt5gui5 : Depends: libgbm1 (>= 8.1~0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
----------------------------------
他愈來愈長了...


再上上篇你提到
====
會請你看「/etc/apt/sources.list.d/」這裡有沒有其他的檔,
是想說,要不要先把其他額外加入的套件庫來源先停用。
====
想問問看該如何停用
(不知道到這個時候停用有用嗎...)

---------------
目前主要卡在libgbm1這個身上
Terminal顯示要sudo apt-get -f install
----
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
------
但是輸入後也依舊不行(感覺沒任何改變)
而現在我也不知道該如何解決的..

2016/5/20 17:26
應用擴展 工具箱
回覆: unmet dependencies && broken packages
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
我剛到家,我先消化一下你給的訊息,等會再回你,
若你不介意重灌,或是你沒有很急要修復這個問題,
這個應該是可以當個練習,藉這個機會,順便了解一下套件管理相關的概念,
雖然我還沒了解全部,但我盡量把我知道目前知道的概念跟你說明。


我之前有整理一些放「在這」,先貼,以後你有空可以研究參考,交互著看。

我也不確定我目前知道的技巧,是否能協助你解決這個問題,先跟你說一聲。
因為我發現有些概念我還沒釐清,
但我又無法去測試了解你遇到著狀況,
或是需要花一點時間研究更深入一點。


Orz...

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

(1) 2 3 4 5 »

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


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