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)
Related
I have my react-naive project completely setup and have been trying to run it to my phone but kep getting the following error when i run the
react-native run-android
command.
Output:
java.io.IOException: Cannot run program "/home/webshinobis/Android/sdk/build-tools/23.0.1/aapt": error=2, No such file or directory
But i have checked the build tools and that file is right there. I have reinstalled the build tools for 23.0.1 but no change. any ideas to help? thanks.
Required libraries for 64-bit machines:
If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries:
$sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
If you are running 64-bit Fedora:
$sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
Ah thank you. I just followed this
sudo dpkg --add-architecture i386
sudo apt-get update
but I got an error said that couldn't found the package. Then I found answer in here .
To summarize it , you should add architecture i386 like this
sudo dpkg --add-architecture i386
sudo apt-get update
this work for me very well.
Since Ubuntu 13.10 no longer has ia32-libs I cannot get my android development environment running on a clean install of 13.10.
The error is ~/android-studio/sdk/build-tools/android-4.2.2/aapt": error=2, No such file or directory
This file does exist and is executable but it is a 32bit executable.
In previous installs I just installed ia32-libs to fix this but this solution no longer works for Ubuntu 13.10.
I have tried solutions proposed by askubuntu questions eg. this one https://askubuntu.com/questions/107230/what-happened-to-the-ia32-libs-package
but it isn't working for me.
From that askubuntu.com answer I see I should install separate packages with
sudo apt-get install package:i386
but I don't know which packages to install to make the android tools work again.
Has anyone else solved this problem and or does anyone have a list of packages which need to be installed for the android tools?
Another way(without adding i386 architecture)...
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo apt-get install lib32z1
Ref: Fix Android adb on Ubuntu 13.10 64bit
While dpkg --add-architecture i386 command is not needed in the current version of Ubuntu (13.10), it is required in the current Debian versions (7.x) and it will be required in the future Ubuntu versions as well. So I am going to leave it in. Just ignore it for Ubuntu 13.10.
sudo dpkg --add-architecture i386
sudo apt-get -qqy update
sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386
Update: aapt indeed requires zlib so I added it to the list. But you should not be needing any lib32 packages.
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.
On Ubuntu 14.04 LTS x64 and buildToolsVersion 21/22 it was enough to execute the following:
sudo apt-get install libc6:i386 libstdc++6:i386
sudo apt-get install zlib1g:i386
The error I was getting:
Execution failed for task ':core:processReleaseResources'.
> A problem occurred starting process 'command '/home/user/androidSDK/android-sdk/build-tools/21.1.2/aapt''
install 13.04 ia32-libs (raring ringtail)
instructions: http://bisonf.wordpress.com/2013/10/19/ubuntu-13-10-how-to-properly-install-ia32-libs-and-ia32-libs-multiarch/
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 looked on this site for this error I'm encountering:
Stopping ADB server failed (code -1).
Unable to run 'adb': Cannot run program "/home/ariel/Downloads/adt-bundle-linux-x86_64/sdk/platform-tools/adb": error=2, No such file or directory.
Starting ADB server failed (code -1).
I've used this command on the terminal provided from this topic.
Android SDK on a 64-bit linux machine
EDIT:
I've tried using this command on terminal:
sudo apt-get install ia32-libs
Sadly, it did nothing and it showed this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libc6-i386 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 'libc6-i386' has no installation candidate
I had the same problem, but it's fine now with these commands :
*sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
for running the emulator you need that additional package:
*sudo apt-get install libsdl1.2debian:i386
then install ia32-libs:
*apt-get install ia32-libs
You need to add i386 packages to apt
dpkg --add-architecture i386
I just used
sudo apt-get install lib32bz2-1.0
For this problem, one may try :
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
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"