Linux, 工作, 生活, 家人

Software

apt-cyg cygwin package manager

cygwin 要使用 install 非常麻煩.
apt-cyg 這個套件提供了一個非常好的安裝方式, 雖然每次都還要跑一次 download setup.bz2 的動作.
但是總比要去使用那個鳥到爆的 setup.exe 好太多了.

簡單 install 方法
[BASH]
# wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
# chmod +x apt-cyg
# mv apt-cyg /usr/local/bin/
[/BASH]

Help
[TEXT]

$ apt-cyg
apt-cyg: Installs and removes Cygwin packages.
“apt-cyg install ” to install packages
“apt-cyg remove
” to remove packages
“apt-cyg update” to update setup.ini
“apt-cyg show” to show installed packages
“apt-cyg find ” to find packages matching patterns
“apt-cyg describe
” to describe packages matching patterns
“apt-cyg packageof ” to locate parent packages
Options:
–mirror, -m : set mirror
–cache, -c

: set cache
–file, -f : read package names from file
–noupdate, -u : don’t update setup.ini from mirror
–help
–version
[/TEXT]

安裝
[TEXT]
# apt-cyg install git
[/TEXT]

找套件
[TEXT]
# apt-cyg find git
[/TEXT]

若是不想每次都要升級 setup.bz2, 可以使用 -u
使用 -m 可以指定 mirror site.
[BASH]
# apt-get -u install git
[/BASH]
如果不想每次都指定 mirror site, 就直接改主程式吧
[TEXT]
# vim `which apt-cyg`

68 mirror=ftp://mirror.mcs.anl.gov/pub/cygwin
69 cache=/setup

這二行可以修改 default mirror site and cache directory.
[/TEXT]

總結, 非常實用.

ref.
Installing Cygwin packages from the command-line [closed]

1 留言

  1. 匿名訪客

    好東西, 讚一個!

發佈留言