
從手冊頁:
-m, --ignore-missing, --fix-missing
Ignore missing packages; if packages cannot be retrieved or fail the integrity
check after retrieval (corrupted package files), hold back those packages and
handle the result.
Use of this option together with -f may produce an error in some situations. If a
package is selected for installation (particularly if it is mentioned on the
command line) and it could not be downloaded then it will be silently held back.
Configuration Item: APT::Get::Fix-Missing.
這很令人困惑:
- 「忽略缺失」和「修復缺失」如何成為相同選項的同義詞?
- 在這種情況下,「阻止」是什麼意思?
- 「處理結果」是什麼意思?
它在什麼情況下有用?當您嘗試安裝不在 apt 索引中的軟體包時,您會收到以下訊息:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
這兩個建議 ( apt-get update
, apt-get install --fix-missing...
) 完全等同嗎?
答案1
好的,依序:
- (1)-m忽略遺失的或修復遺失的包(相對於-F 破碎的包)。這些選項是同義詞對於相同的選項。 (因為要修復它從這裡忽略它需要自己的怪異 :-) )
- (2-3) 當您使用
apt-get upgrade
或 進行安裝/升級時apt-get install somepackage
,通常 apt 會嘗試更新依賴項。這意味著它可能會發現某些套件需要現有套件的新版本或更新版本,等等一系列依賴項。如果其中一些包丟失或未通過完整性檢查,則似乎 暫停這個包裹,並希望你去處理結果如下處理方法如果可能的話,需要的包。通常它會停止安裝此軟體包。 - (4)隨
apt-get update
您下載重建所需的依賴項清單。
之後您可以apt-get install --fix-missing
重試,希望更新的清單能夠自行解決問題。
這有時非常有用,例如當您在 中新增套件的來源時/etc/atp/sources.list
,或當套件索引檔案已更新時。
並非所有可以在 Ubuntu 下使用的程式都來自官方 Ubuntu 儲存庫,並且更新為相同版本 - 這種情況很少見。
此外,安裝突然中斷的原因有很多(終止訊號、電源短缺、圖形驅動程式故障...)在這些情況下,可能無法正常工作,因此您首先需要使用或apt-get update
解決問題 命令。 apt-get install --fix-missing
dpkg
您可以將apt-get install --fix-missing
其視為簡單且友善的命令版本,例如dpkg-reconfigure --all
或dpkg
。