User forums > General (but related to Code::Blocks)
How to load Clang-13 compiler for Codeblocks on Ubuntu
pabristow:
I have installed clang-12 OK and can compiler and link and run with it.
But when I try the analogous command for version 13
sudo apt-get install clang-13 lldb-13 lld-13 --install-suggests
I just get
Package clang-13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source.
https://apt.llvm.org/ suggests that version 13 (and later) are available
To install just clang, lld and lldb (13 release):
apt-get install clang-13 lldb-13 lld-13
with same messages.
I have also found
https://packages.ubuntu.com/source/impish/llvm-toolchain-13
but don't know how to install it.
Any hints for install novice? Thanks.
jordi:
It seems that the package is not in the repository of your ubuntu release.
You could execute the following command to verify it:
apt-cache search clang-1
Commaster:
As you can see here Clang 13 is only available in ubuntu 21.10 (Impish) and newer.
You can match your current release
--- Code: ---> lsb_release -dirc
--- End code ---
to this list and see which are available/supported.
Pecan:
Maybe this will help.
https://apt.llvm.org/
I've used the automatic installer with the <version number> parameter and it work well on Windows WSL Ubuntu
After the install, clang ended up in /usr/bin/ as clang-13<whatever>
--- Code: ---pecan@Zbook17:~$ whereis clang-13
clang-13: /usr/bin/clang-13 /usr/share/man/man1/clang-13.1.gz
pecan@Zbook17:~$ cd /usr/bin
pecan@Zbook17:/usr/bin$ ls clang*
clang++-10 clang-check-10 clang-format-diff clang-query-10
clang++-13 clang-cl-10 clang-format-diff-10 clang-refactor-10
clang-10 clang-cpp-10 clang-import-test-10 clang-rename-10
clang-13 clang-cpp-13 clang-include-fixer-10 clang-reorder-fields-10
clang-apply-replacements clang-doc-10 clang-move-10 clang-scan-deps-10
clang-apply-replacements-10 clang-extdef-mapping-10 clang-offload-bundler-10 clangd
clang-change-namespace-10 clang-format clang-offload-wrapper-10
clang-check clang-format-10 clang-query
pecan@Zbook17:/usr/bin$
--- End code ---
pabristow:
Correct.
https://apt.llvm.org/
For convenience there is an automatic installation script available that installs LLVM for you.
"To install a specific version of LLVM:
--- Code: ---wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 13
--- End code ---
and got expected clang++-13 files.
Thanks.
Navigation
[0] Message Index
[#] Next page
Go to full version