I have this, but it's not working:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main" \
&& apt-get -qq update \
&& apt-get -qq install \
clang-8 \
libc++-dev \
libc++abi-dev \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 100
I get:
E: Unable to locate package clang-8
EDIT
Looks like the 32-bit version of Clang is not available in their repositories. So, I'm completely out of ideas. I can't use their repositories, but I also can't upgrade to Ubuntu 19 (which does have a clang-8
package in the official repositories). Ubuntu 19 doesn't have the other packages I need (not shown above), such as libssl1.0-dev
.
You could try downloading the LLVM/clang source code for the version you want (http://releases.llvm.org/download.html) and building it yourself. There are some instructions in the INSTALL.txt file inside the source code tarball.