'No such file or directory' error in bash, but the file exists?
Solution 1:
It's an executable file that misses required libraries. Use ldd
to see what it needs, then provide these files.
Solution 2:
Android SDK requires 32-bit libraries. You probably are on 64-bit and need the 32-bit libs. Here are the troubleshooting directions from developer.android.com
For Ubuntu 13.10 (Saucy Salamander) and above, install the libncurses5:i386
, libstdc++6:i386
, and zlib1g:i386
packages using apt-get:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
For earlier versions of Ubuntu, install the ia32-libs
package using apt-get:
apt-get install ia32-libs
Solution 3:
sudo apt-get install --reinstall libc6-i386
is also need for me.
Solution 4:
I was also seeing the same after switching my machine from 32 bit ubuntu to 64 bit. Bash would report 'No such file or directory' of files that clearly existed with the execute attribute.
sudo apt-get install --reinstall libc6-i386
Fixed the problem. These are the "GNU C Library: 32-bit shared libraries for AMD64"
Seems like this is a bug in bash. Note that I also changed the default shell from dash to bash using
sudo dpkg-reconfigure dash
before I tried running the 32 bit executable. So I'm not sure if the problem would have happened with the default dash shell
Solution 5:
On a fresh Xubuntu 13.10 x64 install I got adb
to run with:
sudo apt-get install --reinstall libc6-i386
sudo apt-get install libstdc++6:i386
And also zlib1g:i386
to make aapt
work.
and if you still miss something use:
lld adb