apt-get -s E:命令列 [origin -s] 中的選項 « s » 未知

apt-get -s E:命令列 [origin -s] 中的選項 « s » 未知

幾乎所有內容都在標題中,但 14.04。我還嘗試了在 man 中找到的所有 5 個等效的長 (--) 選項,但出現了相同的錯誤。 man 中的 -u 也以同樣的方式失敗。請問這是什麼?謝謝。

答案1

你不能只執行sudo apt-get -s.你需要告訴它做某事。

話雖這麼說,執行 asudo apt-get update -s會產生您提到的相同錯誤:

$ sudo apt-get update -s
E: Command line option 's' [from -s] is not known.

但是,asudo apt-get install -s不會出錯。

$ sudo apt-get install -s
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-23 linux-headers-3.13.0-23-generic linux-image-3.13.0-23-generic linux-image-extra-3.13.0-23-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.

我假設該-s標誌僅適用於某些命令。中提到了apt/取得指南維基百科。給出的範例是 with install,並且沒有明確說明它將與任何其他操作一起使用。

使用 -s 標誌來模擬操作。

相關內容