下位机是米文动力的AD10 Ubuntu 20.04
1、添加密钥
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
2、进入超级用户输入一下指令
nvidia@miivii-tegra:~$ sudo su
root@miivii-tegra:/home/nvidia# gedit /etc/apt/sources.list
将以下内容加入到list里
deb http://apt.llvm.org/focal/ llvm-toolchain-focal main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
# 14
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main
# 15
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main
3、更新
sudo apt update
4、搜索可用版本
apt search clang-format
5、使用apt install clang-format 安装
sudo apt install -y clang-format-14
6、查看当前安装的版本
nvidia@miivii-tegra:~$ clang-format-14 --version
Ubuntu clang-format version 14.0.6