Skip to content

Instantly share code, notes, and snippets.

@anhtran
Created April 9, 2020 14:39
Show Gist options
  • Save anhtran/fdf151c324b481f2d53bb336b311f2df to your computer and use it in GitHub Desktop.
Save anhtran/fdf151c324b481f2d53bb336b311f2df to your computer and use it in GitHub Desktop.
How to install Swift latest version on Debian 9/10
  1. Prerequisites: sudo apt-get install clang libcurl3 libpython2.7 libpython2.7-dev
  2. Download latest stable version from official website: https://swift.org/download/#releases For example: wget https://swift.org/builds/swift-5.2.1-release/ubuntu1804/swift-5.2.1-RELEASE/swift-5.2.1-RELEASE-ubuntu18.04.tar.gz
  3. Untar and move the folder to some places on disk: sudo mv swift-5.2.1-RELEASE-ubuntu18.04 /opt/swift
  4. Add to environment of shell (bash or zsh).
  5. Check version by using: swift --version

IMPORTANT: If you get stuck with error like this: error while loading shared libraries: libtinfo.so.5, you need install an additional package to make it works: sudo apt install libncurses5

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment