Upon installation of the
on the command line will display a message informing me of the packages in which those programs can be found. When trying to reinstall
, apt notifies me that it is already installed and up to date.
The initial installation was carried out using a particular instruction.
sudo apt-get install clang-3.5 llvm
had been previously installed.
Can you suggest any possible explanation for what occurred?
The identifier remains clang-
, despite its presence.
You have two options to run it: either use
. Alternatively, you can create a symlink to it, which is what I did since the regular clang installation didn’t work.
sudo ln -s /usr/bin/clang-3.5 /usr/bin/clang
sudo ln -s /usr/bin/clang++-3.5 /usr/bin/clang++
It may not be the most elegant solution, but at least it is currently functional.
To set clang as the default, it is recommended to utilize
instead of manually configuring both
On a single system, it’s feasible to have multiple programs that perform identical or comparable functions installed concurrently. As an instance, numerous text editors are often present on many systems simultaneously. This provides users with the freedom to select a different editor as per their preference, but it poses a challenge for programs to choose an appropriate editor to activate in case the user hasn’t specified a specific preference.
Initially, it is required to incorporate either
as substitutes for
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-3.5 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.5 100
In case you need to revert to either
, you have the option to use
sudo update-alternatives --config c++
In addition to the clang-x.x package, the clang package can be installed on Ubuntu 15.04. Once installed, the corresponding executable can be accessed by typing clang++.
sudo apt-get install clang
In addition to Yan Foto’s response, if your goal is to obtain a functional
without necessarily utilizing it as
, you have the option of adding all the programs at once through the following method.
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 380
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.8
--slave /usr/bin/clang-check clang-check /usr/bin/clang-check-3.8
--slave /usr/bin/clang-query clang-query /usr/bin/clang-query-3.8
--slave /usr/bin/clang-rename clang-rename /usr/bin/clang-rename-3.8
Please note that the binaries included with each
may vary. For instance,
whereas 3.8 does not.
By following this process for each instance of clang you download, you can easily alternate between them with a lone
It seems that there is a continuing discussion regarding the inclusion of these links in Ubuntu packages, as per this bug report on Launchpad: https://bugs.launchpad.net/ubuntu/+source/llvm-3.1/+bug/991493.