Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»General Articles»How To Install Swift on Debian 9 (Stretch)

    How To Install Swift on Debian 9 (Stretch)

    RahulBy RahulDecember 13, 20182 Mins ReadUpdated:December 29, 2018

    Swift is a safe, fast, expressive general-purpose programming language build for the software design patterns. It is best for the systems programming, to mobile and desktop applications. Swift provides a large number of features that make programming easier while giving the developer the control needed in a true systems programming language.

    This tutorial will help you to install swift programming language on your Debian 9 Stretch Linux system.

    Step 1 – Prerequisites

    Login to your Debian 9 system using SSH (Shell) access. Now install the required dependencies for swift installation on your system.

    sudo apt-get install clang libcurl3 libpython2.7 libpython2.7-dev 
    

    Step 2 – Install Swift on Debian 9

    The official download page provides swift for Ubuntu and Xcode, but you can download archive of Ubuntu 18.04 and install swift on Debian 9 Strech Linux system. Use the following command to download Swift 4.2.1 on the Debian 9 system.

    wget https://swift.org/builds/swift-4.2.1-release/ubuntu1804/swift-4.2.1-RELEASE/swift-4.2.1-RELEASE-ubuntu18.04.tar.gz
    

    Then extract the downloaded archive

    tar xzf swift-4.2.1-RELEASE-ubuntu18.04.tar.gz
    sudo mv swift-4.2.1-RELEASE-ubuntu18.04 /opt/swift
    

    Also, configure the swift binary to system’s PATH environment variable.

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

    Step 3 – Verify Swift Version

    Use the following command to check the current installed Swift version on your system.

    swift --version
    
    Swift version 4.2.1 (swift-4.2.1-RELEASE)
    Target: x86_64-unknown-linux-gnu
    

    Step 4 – Swift REPL Examples

    Just type swift on your system console and you will get Swift console. You can use this console for quick operations and for the learning purpose.

    swift
    
    Welcome to Swift version 4.2.1 (swift-4.2.1-RELEASE). Type :help for assistance.
      1>
    

    Now, run some sample commands to test the console running properly.

    Install Swift Ubuntu 18.04

    Debian 9 Swift
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install CakePHP on Debian 9 (Stretch)
    Next Article How to Install and Configure Squid Proxy on Debian Linux

    Related Posts

    How to Find Django Install Location in Linux

    Updated:April 27, 20221 Min Read

    (Resolved) – ReactJS 404 Error on Page Reload

    2 Mins Read

    Adding a New SSH Key in GitHub

    Updated:April 1, 20223 Mins Read

    13 Best Linux Terminal Emulators and Bash Editors

    8 Mins Read

    How To Install Oracle VirtualBox on Debian 11

    2 Mins Read

    10 Best Linux FTP Clients in 2022

    5 Mins Read

    1 Comment

    1. John on January 5, 2020 8:53 am

      With swift lang 5, you need to have libncurses5 installed on debian or it’ll come up with `libtinfo.so.5′ is missing

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.