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++6It 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 lib32gcc1is 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-19ubuntu1But this version is not the latest available version. Therefore check if you have enabled the trusty-updates repository.
- Start Software & Updates
- Select the tab Updates
Select Recommended updates (trusty-updates) (In my screenshot it's vivid-updates, but that's just an example)
And click Close
Click Reload in this dialog
Now upgrade your system (again ;))
sudo apt-get dist-upgradeAnd install
sudo apt-get install libstdc++6