cygwin 要使用 install 非常麻煩.
apt-cyg 這個套件提供了一個非常好的安裝方式, 雖然每次都還要跑一次 download setup.bz2 的動作.
但是總比要去使用那個鳥到爆的 setup.exe 好太多了.
簡單 install 方法
# wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
# chmod +x apt-cyg
# mv apt-cyg /usr/local/bin/
Help
$ apt-cyg
apt-cyg: Installs and removes Cygwin packages.
"apt-cyg install <package names>" to install packages
"apt-cyg remove </package><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 describe </patterns><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
--help
--version
安裝
# apt-cyg install git
找套件
# apt-cyg find git
若是不想每次都要升級 setup.bz2, 可以使用 -u
使用 -m 可以指定 mirror site.
# apt-get -u install git
如果不想每次都指定 mirror site, 就直接改主程式吧
# vim `which apt-cyg`
68 mirror=ftp://mirror.mcs.anl.gov/pub/cygwin
69 cache=/setup
這二行可以修改 default mirror site and cache directory.
總結, 非常實用.
ref.
Installing Cygwin packages from the command-line [closed]





