Step 2: Do sudo gedit /etc/apt/sources.list and make it look like this:
deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe
clang-6.0
is (at least currently) the default version ofclang
on Bionic:So, you just enable the universe repository and then install
clang
- either from the software store or from the command line usingAdding to @steeldriver's answer,
clang
is a dependency package providing the default clang version, which is 6.0 in Bionic.You may have better luck installing the
clang-6.0
package directly:You can install
clang-6.0
on Ubuntu 18.04 using official LLVM repository.You might be missing some necessary channels from
sources.list
.Step 1: Backup your repositories and remove repository lists other than
sources.list
.Step 2: Do
sudo gedit /etc/apt/sources.list
and make it look like this:Save and exit.
Step 3: Update your repository:
Step 4: Install
clang-6.0
:You can do as users above shared
just that i want to pay your attention to this interesting document : LLVM Debian/Ubuntu nightly packages
to get a complete vision how to install nightly packages.
Actualize by latest versions of the compiler: