Install Swift on Debian (Buster)

Install Swift on Debian (Buster)

sudo apt-get update
sudo apt-get install libncurses5 clang libcurl4 libpython2.7 libpython2.7-dev wget

Download package

sudo mv swift*RELEASE* /opt/swift/

Export path

Add Swift to your PATH variable using your shell's config file.


echo "export PATH=/opt/swift/usr/bin:$PATH" >> ~/.zshrc


echo "export PATH=/opt/swift/usr/bin:$PATH" >> ~/.bashrc

Open a new terminal and type swift --version to confirm.

Handle missing dependencies

If you see:

version `GLIBCXX_3.4.26' not found (required by swift)

Try these steps:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get upgrade libstdc++6