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

wget https://swift.org/builds/swift-5.4.1-release/ubuntu1804/swift-5.4.1-RELEASE/swift-5.4.1-RELEASE-ubuntu18.04.tar.gz
sudo mv swift*RELEASE* /opt/swift/

Export path

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

Zsh

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

Bash

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

Related content

MailSlurp SDKs for Swift and Objective C

Objective C email library. Email account API for Swift and ObjC development

How to fix the any package by glob error in dotnet

Fix .NET installation on Linux for missing dotnet dependencies.

Install Swift on Debian (Buster)

Install Swift on Debian (Buster)

iOS XCode send and read email example

Send and receive email in Swift using MailSlurp email API

Ready to dive in?Start building email applications today.