User forums > General (but related to Code::Blocks)

How to load Clang-13 compiler for Codeblocks on Ubuntu

(1/2) > >>

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.  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

but don't know how to install it.

Any hints for install novice?  Thanks.

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

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.

Maybe this will help.

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

--- End code ---

For convenience there is an automatic installation script available that installs LLVM for you.

"To install a specific version of LLVM:

--- Code: ---wget
chmod +x
sudo ./ 13

--- End code ---

and got expected clang++-13 files.



[0] Message Index

[#] Next page

Go to full version