Install Swift on Debian

July 2, 2018
swift linux
1 minutes to read

Recently, I had to use Swift on Debian for a small project of mine.

There are various installation procedures on the web for installing Swift on Linux but they’re mostly for Ubuntu. Since things change with every Linux distribution, I want to share what I did.

The following procedure will cover installing Swift 4.1.2 on Debian Jessie.

1
apt-get update && sudo apt-get upgrade
1
apt-get install clang libicu-dev
1
sudo apt-get install alien
1
wget https://swift.org/builds/swift-4.1.2-release/ubuntu1404/swift-4.1.2-RELEASE/swift-4.1.2-RELEASE-ubuntu14.04.tar.gz
1
tar -xvzf swift-4.1.2-RELEASE-ubuntu14.04.tar.gz
1
cd swift-4.1.2-RELEASE-ubuntu14.04
1
tar -cvzf swift-4.1.2.tar.gz usr
1
alien -v swift-4.1.2.tar.gz
1
dpkg -i swift_4.1.2_all.deb

That’s it. Now you can enter into Swift by typing swift into your shell prompt or compile your Swift files with swiftc.

under construction...