apt-cyg基本用法
最新的apt-cyg已经可以在github上下载到,大家不用去找googlecode上的版本了。见如下:
https://github.com/transcode-open/apt-cyg
之后,可以通过
apt-cyg -m http://mirrors.163.com/cygwin/
添加163的镜像源
通过
apt-cyg update
进行软件包的更新
apt-cyg MD5校验失败的解决办法
经过确认,目前最新的cygwin包描述中采用sha512的格式。而在apt-cygwin的判断中,使用的还是md5sum进行判断。故需要将apt-cyg文件中的md5sum替换成sha512sum,这样就OK了。
修改方式如下,在download函数中找到 md5sum,替换成sha512sum即可。
if ! test -e $bn || ! sha512sum -c <<< "$digest $bn"
then
wget -O $bn $mirror/$dn/$bn
sha512sum -c <<< "$digest $bn" || exit
fi