apt-get update 和 apt-get install update

apt-get update 和 apt-get install update

apt-get install update和 和有什麼差別apt-get update?也不apt-get install update適合我,不知道為什麼。

的輸出apt-get install update

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package updat

的一些輸出行apt-get update

Ign:2 http://ppa.launchpad.net/cassou/emacs/ubuntu xenial InRelease            
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                   
Get:4 http://linux.dropbox.com/ubuntu wily Release [6,596 B]                   
Hit:5 http://ubuntu-archive.mirror.serveriai.lt xenial InRelease               
Hit:6 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease    
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:9 http://repo.mysql.com/apt/ubuntu xenial InRelease                        
Ign:10 http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu xenial InRelease

如果我用它代替可以嗎apt-get update
謝謝你,和平。

PS:- 我正在使用 16.04 LTS。

答案1

apt-get update指示 apt 從遠端儲存庫取得可用新軟體包的清單(請注意,它不會安裝任何東西,它只是取得可用的清單)。

apt-get install update告訴 apt 安裝一個名為 的軟體包update。在任何已知的儲存庫中都沒有同名的套件。這就是錯誤訊息的原因。每次詢問安裝不存在的軟體包時,您都會收到此類訊息。

雖然我不喜歡@terrance,而且這個問題不是重複的apt-get update 和 update 有什麼不同?,您可能應該按照建議查看該頁面。

至於第二個問題,“如果我改用 apt-get update 可以嗎?” » :

這完全取決於您想要實現的目標。如果您的目標是更新可用軟體包的 apt 列表,那麼可以。另一方面,如果您的目標是列印錯誤訊息並且不更改 apt 內部狀態,那麼不行。

相關內容