之前找源码安装一直没有安装上,然后直接yum了,头疼,浪费了一晚上的时间,之后有空再看看源码安装出了什么事情吧.
yum的方法安装clang的步骤:
1.sudo yum install epel-release
2.sudo yum install clang
如果yum install clang直接就可以的话也不用第一个步骤.
[root@wknode BOOKS]# clang --version
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rh/llvm-toolset-7/root/usr/bin
[root@wknode BOOKS]#
[root@wknode BOOKS]# which clang-tidy
/opt/rh/llvm-toolset-7/root/usr/bin/clang-tidy