Maybe many of you didn’t notice that Apple has open-sourced its Swift 2 code (compiler and core-libraries too) under the MIT license the past december (2015).
I’m going to show you how to install it on your Linux System (Archlinux, Ubuntu and Debian distros) and how to run some basic examples on the swift shell environment.
At first, we’re going to install some dependences and libs needed for swift lang.
Lets get the swift package for this version of Ubuntu.
Now, untar (decompress) the package
This is your package at 15.10
Decompress the package
Export the environment variable
Test your swift installation
Let try something in swift lang !
We’ve set swift 2 on Ubuntu ! Now, lets do it for Archlinux.
Install the binary package from AUR repo
I’m sure that you will get some kind of error about GPG keys, like this:
Fix: Install the GPG signature for ncurses package
Possible error # 2:
“Another GPG signature missing…”
Fix it with:
And that’s all!