- 添加源
你可以在llvm找到适合特定版本的Ubuntu源。
cd /etc/apt
sudo cp sources.list soures.list.bark
sudo vim sources.list #将下面的llvm源(适用于Ubuntu 18.04)粘贴进去
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main
# Needs 'sudo add-apt-repository ppa:ubuntu-toolchain-r/test' for libstdc++ with C++20 support
# 15
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-15 main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-15 main
# 16
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-16 main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-16 main
- 安装llvm
apt-get install libllvm-15-ocaml-dev libllvm15 llvm-15 llvm-15-dev llvm-15-doc llvm-15-examples llvm-15-runtime
- 卸载llvm
apt-get remove llvm* -y
标签:11,llvm,15,下载安装,apt,bionic,toolchain,main
From: https://www.cnblogs.com/yinhaofei/p/17331024.html