如何为 Ubuntu 16.04 安装 LLVM 12?

如何为 Ubuntu 16.04 安装 LLVM 12?

我目前坚持llvm-9使用 Ubuntu 16.04

我想llvm-12与它一起安装。

sudo apt-get install llvm-12*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package llvm-12*
E: Couldn't find any package by glob 'llvm-12*'
E: Couldn't find any package by regex 'llvm-12*'

我该怎么做?

答案1

您可以llvm-12按如下方式安装:

printf "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main" |sudo tee /etc/apt/sources.list.d/llvm-toolchain-xenial-12.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key |sudo apt-key add -
sudo apt update
sudo apt install llvm-12

相关内容