gpt4 book ai didi

c++ - 如何在 Ubuntu13.10 上安装 clang-3.5 而不删除 gcc-4.8

转载 作者:行者123 更新时间:2023-11-30 02:49:47 27 4
gpt4 key购买 nike

我想在我的桌面电脑上安装 clang-3.5(最新版本)。(Ubuntu 13.10)我试过基于 this webpage 的安装设置,

详细步骤如下。

  1. 我在/etc/apt/sources.list.d/中创建了文本文件并添加了以下行。

    deb http://llvm.org/apt/saucy/ llvm-toolchain-saucy maindeb-src http://llvm.org/apt/saucy/ llvm-toolchain-saucy main

  2. 然后,我执行了以下命令。

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

    sudo aptitude install clang-3.5 lldb-3.5

  3. 我收到以下警告消息。它似乎正在删除 gcc 和 clang(旧版本)。但我不想删除 gcc-4.8。

是否可以在 Ubuntu13.10 上安装 clang-3.5 而无需删除 gcc-4.8?

如有任何帮助,我们将不胜感激。提前致谢。

The following NEW packages will be installed: clang-3.5{b} libclang1-3.5{a} libobjc-4.8-dev{a} libobjc4{a} lldb-3.5{b} llvm-3.5{a} llvm-3.5-dev{a} The following packages will be upgraded: gcc-4.8-base libasan0 libatomic1 libclang-common-3.5-dev libgcc-4.8-dev libgcc1 libgomp1 libitm1 libllvm3.5 libquadmath0 llvm-3.5-runtime 11 packages upgraded, 7 newly installed, 0 to remove and 97 not upgraded. Need to get 55.1 MB/59.2 MB of archives. After unpacking 137 MB will be used. The following packages have unmet dependencies: lldb-3.5 : Breaks: lldb-3.2 but 1:3.2repack-7ubuntu1 is installed. libstdc++-4.8-dev : Depends: gcc-4.8-base (= 4.8.1-10ubuntu9) but 4.8.2-1ubuntu1 is to be installed. Depends: libgcc-4.8-dev (= 4.8.1-10ubuntu9) but 4.8.2-1ubuntu1 is to be installed. g++-4.8 : Depends: gcc-4.8-base (= 4.8.1-10ubuntu9) but 4.8.2-1ubuntu1 is to be installed. clang-3.5 : Breaks: clang-3.2 but 1:3.2repack-7ubuntu1 is installed. libstdc++6 : Depends: gcc-4.8-base (= 4.8.1-10ubuntu9) but 4.8.2-1ubuntu1 is to be installed. cpp-4.8 : Depends: gcc-4.8-base (= 4.8.1-10ubuntu9) but 4.8.2-1ubuntu1 is to be installed. gcc-4.8 : Depends: gcc-4.8-base (= 4.8.1-10ubuntu9) but 4.8.2-1ubuntu1 is to be installed. Depends: libgcc-4.8-dev (= 4.8.1-10ubuntu9) but 4.8.2-1ubuntu1 is to be installed. open: 66; closed: 203; defer: 25; conflict: 34
.The following actions will resolve these dependencies:

Remove the following packages:
1) clang
2) clang-3.2
3) g++
4) g++-4.8
5) gcc
6) gcc-4.8
7) lldb-3.2

Upgrade the following packages:
8) cpp-4.8 [4.8.1-10ubuntu9 (now, saucy-updates) -> 4.8.2-1ubuntu1 (saucy)] 9) libstdc++-4.8-dev [4.8.1-10ubuntu9 (now, saucy-updates) -> 4.8.2-1ubuntu1 (saucy)] 10)
libstdc++6 [4.8.1-10ubuntu9 (now, saucy-updates) -> 4.8.2-1ubuntu1 (saucy)] Leave the following dependencies unresolved:
11) cmake recommends gcc
12) ubuntu-desktop recommends gcc
Accept this solution? [Y/n/q/?]

最佳答案

将 34 更改为 35,并且可能需要在其中添加一两个 sudo。

export JN
#export JN='-j 8'

svn co http://llvm.org/svn/llvm-project/llvm/branches/release_34/ llvm34
cd llvm34
cd tools
svn co http://llvm.org/svn/llvm-project/cfe/branches/release_34/ clang
cd ..
./configure --enable-optimized --disable-doxygen --prefix=/opt/llvm34
make $JN
make install

如果你想使用它,然后将/opt/llvm3x/bin 添加到你的路径,否则不要添加路径。

clang/llvm 与 gcc 有什么关系我不知道它们是两个完全独立的东西,就像同时安装 vi 和 emacs 一样。

关于c++ - 如何在 Ubuntu13.10 上安装 clang-3.5 而不删除 gcc-4.8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20929839/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com