如何使用预编译的二进制文件安装CLang? [英] How to install CLang using precompiled binaries?

查看:1660
本文介绍了如何使用预编译的二进制文件安装CLang?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Ubuntu上安装CLANG,使用我下载的CLANG的预编译二进制文件?

How do I install CLang on Ubuntu, using precompiled binaries of CLang that I downloaded?

这是我如何下载CLang:LLVM下载页面 - >下载LLVM 3.2 - >Clang Binaries Ubuntu-12.04 / x86_64( http://llvm.org/releases/3.2/clang + llvm-3.2-x86_64-linux-ubuntu-12.04.tar.gz 。)

Here's how I downloaded CLang: "LLVM Download Page" -> "Download LLVM 3.2" -> "Clang Binaries for Ubuntu-12.04/x86_64" ( http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-linux-ubuntu-12.04.tar.gz .)

然后,我将档案扩展到我的Ubuntu 12.04 LTS 64位机。展开后文件夹的内容如下所示:

Then, I expanded the archive into a folder on my Ubuntu 12.04 LTS 64-bit machine. The contents of the expanded folder look like this:

$ ls clang+llvm-3.2-x86_64-linux-ubuntu-12.04
bin  docs  include  lib  share

问题:接下来该怎么办?我必须自己复制这些文件到一些文件夹,如果是,哪些是正确的?我在网上找到的大多数指令是从源代码构建CLANG,这在这里不适用。

Question: What do I do next? Do I have to copy these into some folders myself, and if so, which ones exactly? Most instructions I found online are for building CLang from source, which doesn't apply here.

我是大多数这些工具的新手。我创建了一个基本的hello世界C ++程序,并能够编译和运行它,使用GCC和自动工具。现在,我想使用CLang编译相同的程序。

I am a newbie to most of these tools. I created a basic hello-world C++ program, and was able to compile and run it, using GCC and autotools. Now, I want to compile the same program with CLang.

推荐答案

您可以按照http://askubuntu.com/questions/89615/how-do-i-install- llvm-clang-3-0

使用GNU tar:

wget <clang-binaries-tarball-url> #  or `curl -O <url>`
tar xf clang*
cd clang*
sudo cp -R * /usr/local/

如果您的 tar 不是GNU和


  • 您获得的档案为 .tar.gz ,您可以使用 tar -xzf ;

  • 如果您有 .tar.xz 归档,可以使用 tar -xJf ; .tar.bz2 归档,您可以使用 tar - ;

  • xjf

  • the archive you get is .tar.gz, you can use tar -xzf;
  • if you have .tar.xz archive, you can use tar -xJf;
  • for .tar.bz2 archive, you can use tar -xjf.

这篇关于如何使用预编译的二进制文件安装CLang?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆