Linux 未找到 Android adb
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13571145/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android adb not found
提问by ealeon
When I run my android app from eclipse, I get this error.
当我从 Eclipse 运行我的 android 应用程序时,出现此错误。
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
从 Eclipse 错误中复制粘贴
[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.
但是,我的 adb 正好位于它所说的位置。
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
我 cd 进入 adb 所在的目录 ( /home/antz/Development/adt-bundle-linux/sdk/platform-tools/
) 并输入 adb 并显示
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?
adb 是绿色的,这意味着它是一个可执行文件,对吗?
for example, dx is also green and when I typed in dx into the command prompt, it works... whats wrong with adb?
例如,dx 也是绿色的,当我在命令提示符中输入 dx 时,它起作用了……adb 有什么问题?
采纳答案by Robin Chander
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.
在Linux中,Android SDK中platform-tools
含有包adb
曾经是32bit
。它在32bit
系统上运行良好。但在64bit
系统上,您需要手动安装 IA32 库。
For Debian based distributions try this:
对于基于 Debian 的发行版,试试这个:
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.
但由于 v24.0platform-tools
仅包含64bit
二进制文件 - 因此32bit
不再需要库。
回答by Khumzzz
Install these libraries in linux apt-get install ia32-libs
在 linux 中安装这些库apt-get install ia32-libs
回答by yokks
You have to install the 32 bit glibc:
您必须安装 32 位 glibc:
in Fedore 64 bit machine
在 Fedore 64 位机器中
# 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.
这消除了尝试执行 32 位二进制文件时误导性的“没有这样的文件或目录”消息。这样,64 位 Fedora 系统就能够执行 64 位二进制文件。
This also removes the misleading 'not a dynamic executable' message of ldd when calling ldd on a 32 bit dynamic executable.
这也消除了在 32 位动态可执行文件上调用 ldd 时 ldd 的误导性“不是动态可执行文件”消息。
Now you have to install missing 32 bit libraries the binaries under adt-bundle-linux/sdk/platform-tools are linked against:
现在您必须安装缺少的 32 位库,adt-bundle-linux/sdk/platform-tools 下的二进制文件链接到:
# yum install zlib.i686 libstdc++.i686 ncurses-libs.i686 libgcc.i686
Thats it.
就是这样。
回答by ekun
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
您不能再安装 ia32-libs,因此您必须安装 adb 所需的各个 32 位库
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
And for Ubuntu 13.10:
对于 Ubuntu 13.10:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
回答by xwindows
On Fedora 17 or 18:
在 Fedora 17 或 18 上:
sudo yum install redhat-lsb.i686
回答by XXX
For multiarch Debian 7.0, add:
对于多架构 Debian 7.0,添加:
dpkg --add-architecture i386
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
回答by GothamNite
This works great in Ubuntu 13.04 64bit version
这在 Ubuntu 13.04 64 位版本中非常有效
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
您不能再安装 ia32-libs,因此您必须安装 adb 所需的各个 32 位库
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
回答by anthonyjruffa
You need to install the ia32-libs (IA32 libraries) package for this to work.
您需要安装 ia32-libs(IA32 库)包才能使其工作。
回答by hemanth reddy
Run these commands below. Its worked for me
在下面运行这些命令。它对我有用
sudo apt-get dist-upgrade
sudo apt-get install ia32-libs
回答by Naumdev
On Arch linux:
在 Arch Linux 上:
Enable the "multiarch" repositories in /etc/pacman.conf
在 /etc/pacman.conf 中启用“multiarch”存储库
then run:
然后运行:
root@box#pacman -Syu
root@box#pacman -S lib32-glibc lib32-zlib lib32-libstdc++5 lib32-ncurses lib32-gcc-libs