apt-cyg 無法連線下載鏡像

apt-cyg 無法連線下載鏡像

每次 apt-cyg 嘗試連接到其伺服器時,它都無法獲得回應並卡在連接上。既然我是透過SSH到達的,那麼如何在不使用圖形介面的情況下更改下載鏡像呢?

答案1

回答

使用日常不受干擾的命令選項後即可解決。

$ apt-cyg --help

apt-cyg: Installs and removes Cygwin packages.
  "apt-cyg install <package names>" to install packages
  "apt-cyg remove <package names>" to remove packages
  "apt-cyg update" to update setup.ini
  "apt-cyg show" to show installed packages
  "apt-cyg find <patterns>" to find packages matching patterns
  "apt-cyg search <patterns>" to find packages matching patterns (alias of find)
  "apt-cyg describe <patterns>" to describe packages matching patterns
  "apt-cyg packageof <commands or files>" to locate parent packages
Options:
  --mirror, -m <url> : set mirror
  --cache, -c <dir>  : set cache
  --file, -f <file>  : read package names from file
  --noupdate, -u     : don't update setup.ini from mirror
  --ignore-case, -i  : Ignore case distinctions in <patterns> when finding packages
  --help
  --version

正如我們所看到的,有一個--mirror選擇。和這裡'Cygwin 鏡像清單。

現在我們可以這樣做:

apt-cyg --mirror "mirror site",將“鏡像網站”替換為您選擇的鏡像連結。

取決於你從哪裡獲得 apt-cyg——或者可能取決於它的版本?沒有前面有雙破折號(並且顯示的幫助資訊apt-cyg --help可能會有所不同)。

相關內容