Android SDK - aapt error : libstdc++.so.6 cannot open shared object file
Asked Answered
A

5

36

I was creating a new project out of nothing, for testing purpose, leaving all parameter to default (I didn't made any code change), on a new ADT installation (Ubuntu Gnome 14.04 LTS, x86_64 CPU), but I have the following error in the Eclipse Console :

[2014-06-11 09:03:10 - Kronos] /home/erwan/Applications/ADT/adt-bundle-linux-x86_64-20140321/sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

Here is what I already tried:

-> I tried to (re)install ia32-libs, libstdc++ and libstdc++6 via Ubuntu software repository : No change

-> Checked for update (for Eclipse and the SDK) : No change

-> Reinstalled All Android Build tools : No change

-> Reinstalling ADB : No change

Anzac answered 11/6, 2014 at 9:1 Comment(1)
it worked, thank you. You can post your answer with the following : sudo apt-get install lib32stdc++6 lib32z1 lib32z1-devAnzac
D
69
sudo apt-get install lib32stdc++6 lib32z1
Demesne answered 11/6, 2014 at 12:29 Comment(5)
I don't think the lib32z1-dev package is needed. I tried without it and it worked fine. The -dev packages are usually only needed when you are compiling something against that library.Durkheim
I don't really know if the lib32z1-dev package is needed or not, but that worked for me.Adalai
For centos: yum upgrade libstdc++, yum install libstdc++.i686 solved the problem for meCharley
As @Durkheim commented no need in the -dev package. Edited the answer and removed it.Delao
Yep, Ubuntu16 needed 32bit stdc++. ThanksEvapotranspiration
P
22

On my 64-bit Ubuntu 14.04 desktop, this was all I needed:

sudo apt-get install lib32stdc++6
Pulpiteer answered 11/12, 2014 at 5:9 Comment(1)
Me too! For anyone else reading this answer, try this first before attempting to install further packages!Fechter
A
7

I too have a 64-bit Ubuntu 14.04 desktop, and the correct answer for that setup is indeed:

sudo apt-get install lib32stdc++6
Anhinga answered 18/12, 2014 at 15:15 Comment(0)
A
1

In my Ubuntu 16.04 , I am not able to install "All" the libs ( sudo apt-get install lib32stdc++6 ) with message saying:

$ sudo apt-get install libgl1-mesa-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 libgl1-mesa-dev:i386 : Depends: libgl1-mesa-glx:i386 (= 11.2.0-1ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

After some digging, I found I was using the aapt with SDK 19. ( android-sdk-linux/build-tools/19.x.y/aapt )

switch the appt from sdk 19 to sdk 24 worked for me.

by editing the corresponding gradle file, change the buildToolsVersion from 19 to 24.0.1:

android {
    buildToolsVersion "24.0.1"
}
Assuming answered 17/8, 2016 at 2:36 Comment(0)
B
0

i'm using ubuntu 15.04 version.I had the same problem. I had already installed ia32-libs package(which has now changed to lib32z1 lib32ncurses5 package) when i tried using command

sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev

i got a list of lib32stdc++6 packages which might solve the problem but this command wasn't able to correct the problem. so i just installed lib32stdc++6 package by using command

sudo apt-get install lib32stdc++6

this worked perfectly for me

Braga answered 18/8, 2015 at 15:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.