ubuntu 15.10 64位
下载地址 https://swift.org/download/#using-downloads
1.首先在ubuntu终端上 (ctl+alt+t打开) 下载clang(编译器)的依赖包
$ sudo apt-get install clang libicu-dev
在上面给出的地址中下载对应的最新release版本的软件包 swift-<VERSION>-<PLATFORM>.tar.gz另外还有对应的.sig文件
2.如果是第一次下载swift软件包,还需要引入PGP密钥
$gpg --keyserver hkp://pool.sks-keyservers.net \
--recv-keys \
'7463 A81A 4B2E EA1B 551F FBCF D441 C977 412B 37AD' \
'1BE1 E29A 084C B305 F397 D62A 9F59 7F4D 21A5 6D5F'
或者是$ wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
3.验证PGP签名
First, refresh the keys to download new key revocation certificates, if any are available:
gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
Then, use the signature file to verify that the archive is intact:
gpg --verify swift-<VERSION>-<PLATFORM>.tar.gz.sig
到这一步出现了bad signature无法进行下去了
若没有出现bad signature可以参考http://www.linuxidc.com/Linux/2016-01/126995.htm