lib32stdc++6 package depends on gcc base but my installed version is newer

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 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 trusty/main amd64 Packages lib32gcc1: Installed: (none) Candidate: 1:4.9-20140406-0ubuntu1 Version table: 1:4.9-20140406-0ubuntu1 0 500 trusty/main amd64 Packages
2

1 Answer

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like