Invalid inferred toolchain? What?!
You’ve installed swiftenv
on your shiny new Ubuntu system, obtained one of the Apple releases with swiftenv install
, but when you run swift build
you get error: invalid inferred toolchain
. That’s no good.
Fortunately the fix is simple, you need to install clang
:
sudo apt-get install clang-3.6 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.6 100 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.6 100
In this example we’re using clang-3.6
but any version 3.6 or higher should be fine.