Skip to content

Instantly share code, notes, and snippets.

@insidegui
Created December 2, 2017 14:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save insidegui/b04addcc8721d890fec2bf237b6a13f4 to your computer and use it in GitHub Desktop.
Save insidegui/b04addcc8721d890fec2bf237b6a13f4 to your computer and use it in GitHub Desktop.
Download Swift 3.1.1 for Raspberry Pi
# List of commands required to install Swift 3.1.1 on Raspberry Pi
# 1. Download prebuilt binaries
wget https://www.dropbox.com/s/7zgw2pwcav2sy2p/swift-3.1.1-RPi23-RaspbianStretchAug17.tgz?dl=1
# 2. Install and update dependencies
sudo apt-get install git cmake ninja-build clang-3.8 python uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev libcurl4-openssl-dev autoconf libtool systemtap-sdt-dev
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100
# 3. Extract the package
tar zxvf swift-3.1.1-RPi23-RaspbianStretchAug17.tgz
# 4. Move to a more convenient place
sudo mkdir /usr/local/swift
sudo mv ./usr/* /usr/local/swift/
# 5. Update bashrc
vim ~/.bashrc
# ADD THE FOLLOWING LINE TO THE END OF YOUR .BASHRC FILE:
export PATH="/usr/local/swift/bin:$PATH"
# 6. Reload bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment