Swift on Linux: Make very first step work

后端 未结 5 855
灰色年华
灰色年华 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 20:49

    I had the exact same problem. It turns out that I had added the ppa:ubuntu-toolchain-r/test repo in order to install g++-4.9 on my Mint distro (17.2). Once I purged the repository and restored various libraries to their original versions, swift finally worked for me.

    Specifically, I had to run

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

    While cleaning up, ppa-purge was complaining that in order to resolve conflicts, it would have to remove quite a few packages it could not find in the Ubuntu Trusty repo (including really core ones like build-essential, xorg, gcc, x11-xserver-utils...), so I made a note and reinstalled these right away after the purge. Just be very careful.

    I think some of the libraries overridden when installing g++ 4.9 were creating a conflict. I've verified all this on a fresh Mint install too.

提交回复
热议问题