Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

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 .)

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

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.

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.

Also asked on StackOverflow: How to install CLang using precompiled binaries?: http://stackoverflow.com/questions/17045954/how-to-install-clang-using-precompiled-binaries .

share|improve this question

closed as off-topic by Gilles, slm, jasonwryan, Anthon, Renan Dec 26 '13 at 2:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – Gilles, slm, jasonwryan, Anthon, Renan

    
Why not simply use the package manager? –  schaiba Jun 11 '13 at 17:29
    
I prefer to not depend on package for this purpose, because I may need to use a newer version of CLang that is available in a package. For example, currently, the package installed by sudo apt-get install clang has CLang 3.0, but I want the latest available, CLang 3.2. –  user1909987 Jun 11 '13 at 18:02
    
Backporting is an option. I backported 3.4 to Debian stable some time ago. The version in stable is 3.0. –  Faheem Mitha Dec 25 '13 at 23:33

1 Answer 1

You can follow the same step as mentioned in http://askubuntu.com/questions/89615/how-do-i-install-llvm-clang-3-0

tar xzf clang*
cd clang*
sudo cp -R * /usr/local/
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.