download Ubuntu 15.1 Swift 2.2 Snapshot and Signature files, including swift-2.2-SNAPSHOT-215-12-1-b-ubuntu15.1.tar.gz and corresponding. sig files.
step 2: install dependencies
use the shortcut key Ctrl+Alt+T to open the terminal. Install clang:
$ sudoapt-get install clang libicu-dev
Step 3: Import a new PGP key to keyring of Ubuntu system
$ gpg-keyserver HKP://pool.sks-keyservers.net \
-recv-keys \
' 7463a81a4b2eea1b551f fbcf d441c977 412b 37ad' \
' 1be1e29a84cb35f397d62A 9f59 7F4 D21a5 6D5'
Step 4: Update signature verification. Update the key certificate:
$ gpg-key server HKP://pool.sks-key servers.net-refresh-keys swift
Secondly, verify the signature authentication:
$ gpg-verify swift-<; VERSION> -< PLATFORM> .tar.gz.sig
Description: the verification file is swift-<; VERSION> -< PLATFORM> Tar.gz.sig, which is the file name of the Signature downloaded in the first step.
a warning may appear in this step, prompting the contents as shown in the figure. Just ignore this warning.
step 5: extract the file
$ tar xzf swift-<; VERSION> -< PLATFORM> . tar.gz
here <; VERSION> -< PLATFORM> Consistent with the previous step. After decompression, there will be an extra decompressed folder under the current folder.
step 6: add environment variable
$ export PATH=~/ document/swift-2.2-snapshot-215-12-1-b-Ubuntu 15.1/usr/bin: $ {path}
where "~/document/swift-swift.
note: the environment variables added here are only applicable in the current session, and need to be added again after the terminal is reopened next time.
in order not to add the path again every time, You can modify the ~/.bashrc file $ sudo vim ~/.bashrc
and add:
export PATH=~/ document/swift/swift-2.2-snapshot-215-12-1-b-Ubuntu 15.1/usr/bin: $ {path}
start your Swift trip!
enter $ swift at the terminal.