在CentOS7中安装LLVM-Toolset-10.0或更新

发布于 2025-02-10 20:24:12 字数 547 浏览 2 评论 0原文

我使用Docker Image Docker Run -ti Centos:7/bin/bash,我尝试install install llvm-toolset-10.0 的yum install llvm-toolset-10.0,但获得了错误no Package llvm-toolset-10.0可用。

像这样 https://github.com/llvm/llvm-project/releases“ rel =“ nofollow noreferrer”> https://github.com/llvm/llvm/llvm/llvm/llvm/llvm/releases/releases ,但是得到bash:bash:bash:bash:bash: ./clang:无法执行二进制文件,我使用了clang+llvm-13.0.0.0.0.0.0.0.0-powerpc64le-linux-rhel-7.9

问题如何在CentOS7中使用版本或更高版本安装Clang或LLVM?

I used docker image docker run -ti centos:7 /bin/bash, i try install llvm-toolset-10.0
like this yum install llvm-toolset-10.0 but got error No package llvm-toolset-10.0 available.

After that i tried use pre-built binraries from https://github.com/llvm/llvm-project/releases, but got bash: ./clang: cannot execute binary file, i used clang+llvm-13.0.0-powerpc64le-linux-rhel-7.9.

Question how to install clang or llvm with version 10 or higher in Centos7?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡淡绿茶香 2025-02-17 20:24:12

。 RPM未签名,因为它们从未出版给官方的Centos SCL存储库;因此,默认情况下它们不会被信任。另请注意,由于LLVM-Toolset中的某些软件包对DevToolset具有依赖性,因此您将需要确保安装了正确的DevToolset存储库。

为DevToolSet添加repo

sudo yum install centos-release-scl-rh

创建一个自定义回购指向buildLogs

sudo bash -c 'cat << EOF > /etc/yum.repos.d/llvmtoolset-build.repo
[llvmtoolset-build]
name=LLVM Toolset 11.0 - Build
baseurl=https://buildlogs.centos.org/c7-llvm-toolset-11.0.x86_64/
gpgcheck=0
enabled=1
EOF'

安装所需的LLVM工具集软件包

sudo yum install --nogpgcheck llvm-toolset-11.0-clang-tools-extra llvm-toolset-11.0-clang

启用LLVM Toolset

echo "source /opt/rh/llvm-toolset-11.0/enable" >> ~/.bashrc
source ~/.bashrc

There is a llvm-toolset-10 build out on the centos buildlogs. The rpms are unsigned since they never got published out to the official centos scl repos; thus they won't be trusted by default. Also note that since some of the packages in llvm-toolset have a dependency on devtoolset you will need to ensure you have the right devtoolset repo installed as well.

Add repo for devtoolset

sudo yum install centos-release-scl-rh

Create a custom repo pointing to buildlogs

sudo bash -c 'cat << EOF > /etc/yum.repos.d/llvmtoolset-build.repo
[llvmtoolset-build]
name=LLVM Toolset 11.0 - Build
baseurl=https://buildlogs.centos.org/c7-llvm-toolset-11.0.x86_64/
gpgcheck=0
enabled=1
EOF'

Install the llvm toolset packages you need

sudo yum install --nogpgcheck llvm-toolset-11.0-clang-tools-extra llvm-toolset-11.0-clang

Enable the llvm toolset

echo "source /opt/rh/llvm-toolset-11.0/enable" >> ~/.bashrc
source ~/.bashrc
眉目亦如画i 2025-02-17 20:24:12

通过Conda或Homebrew的安装,您的安装失败可能是PowerPC64LE不是您的处理器类型,而是旧处理器类型。

Install by conda or homebrew in general, you installation failure might be powerpc64le is not your processor’s type, it's an old processor type.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文