2

I am trying to build an android app on Ubuntu 14.04 using eclipse juno and android adt bundle. Now when i try to run my application it shows the error regarding adb. Now in order to resolve that i need to install 32 bit libraries and in those libraries one of them is libstdc++6. When i type the following command:

sudo apt-get install libstdc++6

It shows the following error:

The following packages have unmet dependencies:
   lib32stdc++6 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
                 Depends: lib32gcc1 (>= 1:4.1.1) but it is not going to be installed
   E: Unable to correct problems, you have held broken packages.

Edit:

The output of the command:

     sudo apt-cache policy lib32stdc++6 gcc-4.8-base lib32gcc1

is as following:

lib32stdc++6:
        Installed: (none)
        Candidate: 4.8.2-19ubuntu1
       Version table:
        4.8.2-19ubuntu1 0
           500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
gcc-4.8-base:
      Installed: 4.8.4-2ubuntu1~14.04
      Candidate: 4.8.4-2ubuntu1~14.04
      Version table:
      *** 4.8.4-2ubuntu1~14.04 0
             100 /var/lib/dpkg/status
         4.8.2-19ubuntu1 0
             500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
 lib32gcc1:
    Installed: (none)
    Candidate: 1:4.9-20140406-0ubuntu1
    Version table:
       1:4.9-20140406-0ubuntu1 0
         500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
0

1 Answer 1

3

You have installed gcc-4.8-base 4.8.4-2ubuntu1~14.04 by a (in the meantime deleted) PPA or via a deb file. As the version of this package is higher than the requested version (= 4.8.2-19ubuntu1), the package libstdc++6 is not installed. Therefore force the installation of official version via a downgrade:

sudo apt-get install gcc-4.8-base=4.8.2-19ubuntu1

But this version is not the latest available version. Therefore check if you have enabled the trusty-updates repository.

  1. Start Software & Updates
  2. Select the tab Updates
  3. Select Recommended updates (trusty-updates) (In my screenshot it's vivid-updates, but that's just an example)

    enter image description here

    And click Close

  4. Click Reload in this dialog

    enter image description here

  5. Now upgrade your system (again ;))

    sudo apt-get dist-upgrade
    
  6. And install

    sudo apt-get install libstdc++6
    
11
  • The following packages have unmet dependencies: indicator-bluetooth : Depends: unity-control-center but it is not going to be installed or gnome-control-center but it is not going to be installed or ubuntu-system-settings but it is not going to be installed libdee-1.0-4 : Depends: libicu52 (>= 52~m1-1~) but it is not going to be installed system-image-dbus : Depends: system-image-common (= 2.2-0ubuntu1) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. Sep 8, 2015 at 16:17
  • This is what i am getting when i tried to force install.. Sep 8, 2015 at 16:17
  • Okay,,, why do you say that ?? Sep 8, 2015 at 16:52
  • Okay.. Now you have me totally scared. What should be done? And is there anything that can be done at this point?? Sep 8, 2015 at 16:56
  • Let us continue this discussion in chat. Sep 8, 2015 at 17:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .