9

How should I correctly install clang's c++ library (with STL) on my lubuntu machine? I want to use clang and its c++ library because it offers better support for the upcoming c++14 standard.

When trying to install libc++:

sudo apt-get install libc++

I get:

<!-- Fairly large amount of installed/up-to-date packages which I removed from the post-->
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libcgi-application-plugin-captcha-perl : Depends: libdata-random-perl but it is not going to be installed
 libcloog-isl-dev : Conflicts: libcloog-ppl-dev but 0.16.1-5 is to be installed
 libclutter-gst-2.0-doc : Conflicts: libclutter-gst-doc but 1.6.0-2build1 is to be installed
 libcuda1-304 : Conflicts: libcuda-5.0-1
 libcuda1-304-updates : Conflicts: libcuda-5.0-1
 libcuda1-331 : Breaks: libcuda-5.0-1
                Breaks: libcuda-5.5-1
 libcuda1-331-updates : Breaks: libcuda-5.0-1
                        Breaks: libcuda-5.5-1
 libcunit1-ncurses : Conflicts: libcunit1 but 2.1-2.dfsg-1 is to be installed
 libcunit1-ncurses-dev : Conflicts: libcunit1-dev but 2.1-2.dfsg-1 is to be installed
 libcurl4-gnutls-dev : Conflicts: libcurl4-nss-dev but 7.35.0-1ubuntu2 is to be installed
                       Conflicts: libcurl4-openssl-dev but 7.35.0-1ubuntu2 is to be installed
 libcurl4-nss-dev : Conflicts: libcurl4-gnutls-dev but 7.35.0-1ubuntu2 is to be installed
                    Conflicts: libcurl4-openssl-dev but 7.35.0-1ubuntu2 is to be installed
 libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.35.0-1ubuntu2 is to be installed
                        Conflicts: libcurl4-nss-dev but 7.35.0-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

I am running lubuntu 14.04 on a Samsung Series 9 Ultrabook. I don't understand the conflicts, especially the ones related to CUDA, which is supposed to be only for systems with an NVidia GPU.

Please let me know what other information I need to provide.


EDIT:

After some trying around, I installed the libc++-dev package:

sudo apt-get install libc++-dev

This installed the header files which clang now finds and uses. This doesn't answer the original question of why apt-get attempted to install libc++ which apparently doesn't exist and why it got into conflicts (whith CUDA of all things!).

3 Answers3

16

There is no package called libc++. It is libc++1.

So run the command as :

sudo apt-get install libc++1 multiarch-support libc6 libc++-dev libc++-helpers libc++-test libc++abi-dev libc++abi-test libc++abi1
2

Firstly type 'sudo apt-get -f install'. This will try to fix broken dependencies. If this ends up 'and x not upgraded', then type the following afterwards: 'sudo apt-get dist-upgrade'. This last command might install some new packages, so be careful.

Gx1sptDTDa
  • 1,663
  • 1
  • 15
  • 24
1

The package libc++ doesn't exist. Most likely, apt-get is treating "libc++" as a regex and installing anything that matches that regex. Hence, you get the long list of packages to install.

The package you're (probably) looking for is libc++1.

saiarcot895
  • 10,917