Ubuntu 12.04, installed two versions of compiler 3 and 3.8. How to choose that 3.8 was default?

$ sudo update-alternatives --config clang

update-alternatives: error: no alternatives for clang.

    1 answer 1

    How did you install two versions of clang and which one is now on the way?

    which clang

    Configuring via update-alternatives is a good idea, you can add an entry yourself:

    sudo update-alternatives --install $(which clang) clang /path/to/actual/binary 1000000

    1,000,000 - recording priority

    • 3 of native reps, 3.8 of deb apt.llvm.org/precise llvm-toolchain-precise-3.8 main deb-src apt.llvm.org/precise llvm-toolchain-precise-3.8 main. / usr / bin / clang and /usr/bin/clang-3.8 - Andrew
    • one
      sudo update-alternatives - install / usr / bin / clang clang /usr/bin/clang-3.8 1,000,000 - yaromir
    • And sudo update-alternatives --install / usr / bin / clang ++ clang ++ /usr/bin/clang++-3.8 1000000 Thank you =) - Andrew