I am facing an issue on ubuntu 12.04 as :
/usr/lib/ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/as:
error while loading shared libraries: libz.so.1: cannot open shared
object file: No such file or directory
I tried
sudo apt-get install lib32z1
But it says
Reading package lists... Done Building dependency tree Reading
state information... Done lib32z1 is already the newest version. 0
upgraded, 0 newly installed, 0 to remove and 610 not upgraded.
Please suggest a solution.
After checking to which package does the libz.so.1 belongs (http://packages.ubuntu.com/lucid/i386/zlib1g/filelist) you should try to install zlib1g:
sudo apt-get install zlib1g
As pointed by #E-rich, it may be required to add a :i386 suffix to the package name for the package manager correctly identify it:
sudo apt-get install zlib1g:i386
EDIT (for CentOS or other distro that makes use of yum):
If someone using CentOS (or any other distro that makes use of yum) that may end up reading this question, #syslogic proposed the following solution in the comments:
yum install zlib.i686
or, for 32-bit binaries:
yum install zlib.i386
This worked for me
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
For Fedora (can be useful for someone)
sudo dnf install zlib-1.2.8-10.fc24.i686 libgcc-6.1.1-2.fc24.i686
Check below link:
Specially "Install 32 bit libraries (if you're on 64 bit)"
https://github.com/meteor/meteor/wiki/Mobile-Dev-Install:-Android-on-Linux
sudo apt-get install zlib1g:i386
fixed the Gradle issue on Android 2.1.1 on Xubuntu 16.04.
for centos, just zlib didn't solve the problem.I did
sudo yum install zlib-devel.i686
For Arch Linux, it is pacman -S lib32-zlib from multilib, not zlib.
Just thought everyone should know that the videodownloadhelper companion applicaiton installs it's own version of libz.so.1 in /usr/lib at least in Archlinux. A simple reinstall of zlib, even with --overwrite='*' does not fix the problem. It actually breaks the kernel and a pacstrap from the recovery media is needed. Stay away from the vdhcoapp for now...
I've downloaded these packages:
libc6-i386
lib32stdc++6
lib32gcc1
lib32ncurses5
zlib1g
I then unpacked them and added the directories to LD_LIBRARY_PATH in my ~/.bashrc. Just make sure to add proper dirs to the path.
Related
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
sudo apt-get install lib32stdc++6 lib32z1
On my 64-bit Ubuntu 14.04 desktop, this was all I needed:
sudo apt-get install lib32stdc++6
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
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"
}
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
I'm trying to build an Android project on an Ubuntu 12.04 machine, 64 bit.
For some reason, after I've done everything required, I still can't run "aapt".
As instructed, I downloaded the SDK and installed all the packages.
I changed permissions on the file, and also installed 32->64 bit multiarch libraries:
sudo apt-get install ia32-libs
sudo apt-get install ia32-libs-multiarch
Because this didn't work, and after a whole lot of more searches, I also installed:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
Still, I get
aapt: command not found
Please let me know if there's anything else to attach to the question.
Any ideas?
As commented by Sinhyeok: JafarKhQ's solution works for us, which is:
sudo apt install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
You might be missing the android sdk from your PATH environment variable.
I have installed android SDK and android eclipse plugin successfully on Ubuntu 12.10.
I created the AVD in eclipse, and now it's not running. This is the output error I receive when I run the AVD:it tips:
Starting emulator for AVD 'avd'
Failed to start emulator: Cannot run program "/home/sancai/android/adt-bundle-linux-x86_64-20130522/sdk//tools/emulator": java.io.IOException: error=2, No such file or directory
I find information via google, everyone says this is because my system version is 64, while the adt only support 32, to install: sudo apt-get install ia32-libs, when I installed the 32-bit library, other problems arise such as the library file association to other libraries, but has no other library files are fully,it tips:
sancai#ubuntu:~$ sudo apt-get install ia32-libs
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:
ia32-libs : Depends: ia32-libs-multiarch but it is not installable
E: Unable to correct problems, you have held broken packages.
sancai#ubuntu:~$ sudo apt-get install ia32-libs-multiarch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs-multiarch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ia32-libs-multiarch' has no installation candidate
This should help:
Go to xx/sdk/tools and run:
mv emulator emulator.bak
ln -s emulator64-arm emulator
No need to install any ia32 libs.
This is the answer http://astroelec.blogspot.com/
(using Debian)
Installing ia32-libs will no longer work as debian has moved to multiarch support.
Solution. Use Multiarch
Multiarch support makes installing libraries from the i386 distribution easy...
sudo dpkg --add-architecture i386
sudo aptitude update
sudo aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Now launch eclipse, and everything should now work just fine.
In my configuration, I have set up the virtual devices to use Intel Atom system image. Lawrence Angrave from the University Illinois said in his Coursera androidapps101 course that it will run faster than the ARM image. So this works for me:
mv emulator emulator_bak
ln -s emulator64-x86 emulator
You do not need install packages any more!
In directory tools, there are many types of emulator, while my computer works with emulator64-arm! My system is Linux Mint 16 amd64! Good luck!
./emulator64-arm #yxphone -sdcard yxsd -scale 0.8
it's easy,this is my solutions.
copy and paste, this lines in your terminal.
apt-get install libncurses5:i386 \
libstdc++6:i386 \
zlib1g:i386
good luck!!
This might help
sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6
When I run my android app from eclipse, I get this error.
Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2 No such file or directory' while attempting to get adb version from /home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb
COPY PASTE FROM Eclipse Error
[2012-11-26 13:43:08 - adb] Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2, No such file or directory' while attempting to get adb version from '/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb'
However my adb is exactly in the location where it says it's not.
What is wrong and how do I fix this?
I cd into the directory where adb is (/home/antz/Development/adt-bundle-linux/sdk/platform-tools/) and I typed in adb and it says
antz#antz-90X3A:~/Development/adt-bundle-linux/sdk/platform-tools$ ls
aapt aidl dexdump fastboot llvm-rs-cc renderscript
adb api dx lib NOTICE.txt source.properties
antz#antz-90X3A:~/Development/adt-bundle-linux/sdk/platform-tools$ adb
bash: /home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb: No such file or directory
adb is green which means its an executable, correct?
for example, dx is also green and when I typed in dx into the command prompt, it works... whats wrong with adb?
On Linux, Android SDK platform-tools package containing adb used to be 32bit. It worked fine on 32bit systems. But on 64bit systems you need to manually install the IA32 library.
For Debian based distributions try this:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
But since v24.0 platform-tools contains only 64bit binaries - so 32bit libraries no longer required.
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
And for Ubuntu 13.10:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
You have to install the 32 bit glibc:
in Fedore 64 bit machine
# yum install glibc.i686
This removes the misleading 'no such file or directory' message when trying to execute a 32 bit binary. With that the 64 bit Fedora system is capable of executing 64 bit binaries.
This also removes the misleading 'not a dynamic executable' message of ldd when calling ldd on a 32 bit dynamic executable.
Now you have to install missing 32 bit libraries the binaries under adt-bundle-linux/sdk/platform-tools are linked against:
# yum install zlib.i686 libstdc++.i686 ncurses-libs.i686 libgcc.i686
Thats it.
I'm using Ubuntu 14.04 LTS 64-bit and the following code works for me;
sudo apt-get install lib32z1 lib32z1-dev
sudo apt-get install lib32stdc++6
Summary:
After I tried apt-get install ia32-libs, but apt package tool suggest that;
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source.
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
Then the above code works for me.
This works great in Ubuntu 13.04 64bit version
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
On Arch linux:
Enable the "multiarch" repositories in /etc/pacman.conf
then run:
root#box#pacman -Syu
root#box#pacman -S lib32-glibc lib32-zlib lib32-libstdc++5 lib32-ncurses lib32-gcc-libs
I am running Ubuntu 12.04 LTS and this command is the only thing that worked for me:
sudo apt-get install lib32z1 lib32z1-dev
Once I ran that from a command line, I was able to get the R.java file to generate (the tell-tale sign that something in your Android SDK tools installation is not quite right) by doing a Project > Clean in Eclipse.
For multiarch Debian 7.0, add:
dpkg --add-architecture i386
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
On Fedora 17 or 18:
sudo yum install redhat-lsb.i686
You need to install the ia32-libs (IA32 libraries) package for this to work.
I did it in my Linux Mint 12:
chmod +x PATH/adb
if you're having this problem in 64bits, try this (worked for me):
$ apt-get install lib32gcc1 libc6-i386 lib32z1 lib32stdc++6
$ apt-get install lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev
$ apt-get install g++-multilib
http://sixarm.com/about/ubuntu-apt-get-install-ia32-for-32-bit-on-64-bit.html
From the Ubuntu Multiarch HOWTO:
Some users using the Android SDK might encounter problems when trying to run build-tools or platform-tools on amd64 bit platform. As replacement for ia32-libs, users should be fine just installing the following libraries:
dpkg --add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Install these libraries in linux apt-get install ia32-libs
Run these commands below. Its worked for me
sudo apt-get dist-upgrade
sudo apt-get install ia32-libs
in ubuntu 64 bits [12.04]-[14.10] and Elementary OS 64 bits
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
Sometimes it's just a matter giving sdk files the necessary permissions.
sudo chmod -R +x /path/to/android-sdk-linux
Restart Android Studio and see if that fix it.
Permission issues typically occur when you copy/move sdk files from a NTFS partition or copying from another computer.
sudo apt install adb
adb not installed in your pc
Try this.
http://abhinavasblog.blogspot.sg/2013/10/working-with-ubuntu-1304-and-1310-java.html
the blog explain resolution to Ubuntu 13.10 for installing Chrome, Java and Fixing Android SDK.
The correct current combo for Arch Linux is as follows: :
[This part is unchanged] Uncomment the following section in /etc/pacman.conf:
...
[multilib]
Include = /etc/pacman.d/mirrorlist
...
Then:
sudo pacman -Syu && sudo pacman -S multilib/lib32-libstdc++5 multilib/lib32-zlib
The difference with the other answer is that package names include the multilib/ part now.
(from Arch Wiki: Multilib#Enabling, Android#Troubleshooting)
I am a Linux n00b trying to setup my development environment in Eclipse. I have Eclipse and the Android SDK installed, but I am getting some errors when I start Eclipse or when I try to run ./aapt or ./adb.
jason#ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./aapt
./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
jason#ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./adb
./adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64
That ELF class error makes me think I installed a wrong version of the software but I do not recall being asked to choose between x86 and x86-64.
jason#ubuntu:~/usr/android-sdk-linux_x86$ echo $MACHTYPE
x86_64-pc-linux-gnu
Are you sure you followed this guide completely? Do you have ia32-libs installed?
Try this:
sudo apt-get install ia32-libs
I'm on Ubuntu 13.10 64 bit and the above solutions don't quite work (I'm also using Andriod Studio but that shouldn't matter). I guess the issue is that Google's ADK binary is a 32 bit application. This worked for me:
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
apt-get install lib32ncurses5 lib32stdc++6
It depends on the Ubuntu version you running
If you running Ubuntu < 12.04 then run: sudo apt-get install ia32-libs
(ia32-libs was deprecated in 12.04)
If you running Ubuntu >= 12.04 then run: apt-get install lib32ncurses5 lib32stdc++6
To check your ubuntu version click on the cog icon in the top right corner and click "About this computer"