I have taken rpm packages from https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-3.9.0/epel-7-x86_64/00505197-clang-3.9.0/ for Clang 3.9.
I am installing the rpm packages by the command
rpm -ivh clang-3.9.0-3.9.0-3.1.el7.centos.alonid.src.rpm
But when I do
rpm -ivh clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64.rpm
I get the following error :
error: Failed dependencies:
clang-3.9.0-libs(x86-64) = 3.9.0-3.1.el7.centos.alonid is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libLLVM-3.9.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclang.so.3.9()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangAST.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangBasic.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangCodeGen.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangDriver.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangFormat.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangFrontend.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangFrontendTool.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangIndex.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangRewrite.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangRewriteFrontend.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangStaticAnalyzerFrontend.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangTooling.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangToolingCore.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
Where should I install all these dependencies from?
A complete installation process is provided by Red Hat, please refer to Red Hat documents.
There was a much easier way to achieve this:
Add the Alonid's repo to
/etc/yum.repos.d/epel.repo
(assuming you have epel repo installed)Then just
sudo yum install clang-3.9.0
I am the author of the RPM repository you mention.
Follow from the main Copr page of the repository:
https://copr.fedorainfracloud.org/coprs/alonid/llvm-3.9.0/
If you have any question, you can contact me from there. Thanks!
Just open your link and look around, also go one level higher and find all necessary
.rpm
's. The following sequence worked for me:By just doing
yum install
without any flags Clang and LLVM will be installed to/opt/llvm-3.9.0
:Also notice that there are other packages like
-devel
,-static
,-debuginfo
.Useful tip: Without installing
-devel
packages you only getbin
andlib64
folders where only the executables likebin/clang
and libraries likelib64/libLLVM-3.9.0.so
are located. If you also want to develop something with LLVM/Clang you will need corresponding-devel
packages. Then you will also getinclude/
folder with headers.By the way, thanks to the maintainers of this repo. Nice to have LLVM 3.9 out of the box.
By enabling the SCL repository you can install Clang 5.0.1 on CentOS 7 using the
llvm-toolset-7
package.Enable
llvm-toolset-7
:You can now check you clang version with:
See this Red Hat blog post for more information.
For more information about SCL, see this page.