Swift on Linux: Make very first step work

后端 未结 5 835
灰色年华
灰色年华 2021-02-19 20:19

I am totally new to swift. It has just been released as open source for linux and I wanted to try it. This is on ubuntu 14.04. clang is installed as per prerequisites.

5条回答
  •  [愿得一人]
    2021-02-19 21:04

    Following the advice of James D, I tried to run

    sudo apt-get install ppa-purge
    sudo ppa-purge -d trusty ppa:ubuntu-toolchain-r/test
    

    However, this did not work. What's strange, is that what did work doesn't make sense. For me, I got it working by installing the above ppa first and then purging it. The whole command set that got me working was

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt-get update
    sudo apt-get install g++-4.9 # This step may be optional
    
    sudo apt-get install ppa-purge
    sudo ppa-purge -d trusty ppa:ubuntu-toolchain-r/test
    

提交回复
热议问题