How to update the Clang compiler from version 3.1 to version 3.4 in Debian Linux?

1

It is as what the question is saying, I am new on Linux. I need the Clang++ compiler update to version 3.4 for the assignment that I need to do. I simply just typed in Terminal

sudo apt-get install clang++

this command only install/update my clang++ to version 3.1. And I have no idea how to update it. I went on the clang++ debian website and see different packages but have no idea how to update it. I copied some command but they don't run on Terminal. This is the clang++ site I went to. I tried search online for tutorial or help but there was none that could help me with this issue. I am new to Linux so I will really appreciate it if someone give out a detailed update process. Thank you for your time.

user3595342

Posted 2014-08-30T05:13:45.773

Reputation: 11

Which version of Debian are you using? – rickhg12hs – 2014-08-30T12:01:30.423

Debian GNU/Linux 7.6 (wheezy) – user3595342 – 2014-08-30T13:10:15.413

Answers

0

My first try would be to remove any clang components that are already installed if I'm sure that I don't need them and only an updated version will do.

Next I would try following the instructions from the link you provided. I can see how it could be confusing if you haven't done it before.

To install all the v3.4 packages on your Debian Wheezy system, I would become root with su - and execute the commands below, or use sudo in front of every command.

cat - >> /etc/apt/sources.list << HERE
deb http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main
deb-src http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main
HERE

wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -

apt-get install clang-3.4 clang-3.4-doc libclang-common-3.4-dev libclang-3.4-dev libclang1-3.4 libclang1-3.4-dbg libllvm-3.4-ocaml-dev libllvm3.4 libllvm3.4-dbg lldb-3.4 llvm-3.4 llvm-3.4-dev llvm-3.4-doc llvm-3.4-examples llvm-3.4-runtime clang-modernize-3.4 clang-format-3.4 python-clang-3.4 lldb-3.4-dev

rickhg12hs

Posted 2014-08-30T05:13:45.773

Reputation: 428