Install the SWIFT environment on UBUNTU15.10

Source: Internet
Author: User

Since Swift Open source, the building of Swift will no longer have to have the necessary Mac, on the open source of Ubuntu can also install the SWIFT compiler environment, today idle bored began to build an environment to play. Morning to get a half-day of the SWIFT environment, finally set up after the dead and alive can not use, but also shows the following error:

BASH:/home/swift-2.2.1-release-ubuntu15.10/usr/bin/swift:cannot execute binary file:exec format error

Surfing the internet for a long time, tried n method, can still not line, finally rage to the SWIFT official website to see a bit, the results found that Ubuntu must be 64bit , so again download 64-bit version began to install.

Note: If you are afraid of input errors, it is recommended to install SECURECRT software by installing SSH service on Ubuntu and telnet to Ubuntu "

$ sudo apt-get install SSH

$ service SSH Start


1. First, install the appropriate tools

$ sudo apt-get install clang Libicu-dev


2. Then, start downloading the Swift library (https://swift.org/download/#releases offers different versions of Ubuntu download, mine is ubuntu15.10)

$ wget https://swift.org/builds/swift-2.2.1-release/ubuntu1510/swift-2.2.1-RELEASE/swift-2.2.1-RELEASE-ubuntu15.10.tar.gz

3. Then, unzip the downloaded file

$ tar xvf swift-2.2.1-release-ubuntu15.10.tar.gz

4. Finally, set the path (enter the extracted directory, then enter Usr/bin, use the command pwd to get the current path, fill in the following path=, and at the end add: "${path}")

Export path=/home/zx/swift-2.2.1-release-ubuntu15.10/usr/bin: "${path}"


The effect is as follows:

[Email protected]:~$ Swift--version

Swift version 2.2.1 (swift-2.2.1-release)

Target:x86_64-unknown-linux-gnu


Install the SWIFT environment on UBUNTU15.10

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.