Ubuntu上的“未找到命令'adb'"错误 [英] 'No command 'adb' found' error on Ubuntu

查看:268
本文介绍了Ubuntu上的“未找到命令'adb'"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚有一台全新的Ubuntu计算机,并且正在尝试设置Android SDK.我对Unix很陌生,所以如果我犯了一个愚蠢的错误,请原谅我.

I just got a brand new Ubuntu machine and I am trying to setup Android SDK. I am pretty new to Unix so pardon me if I did a silly mistake.

我一直按照此处给出的说明进行操作,一直到添加"Rule"文件为止.现在,如果我在终端中尝试adb devices,它会显示未找到命令'adb'"错误,并询问我是否犯了拼写错误.

I followed the instructions given here, all the way up to adding the 'Rule' file. Now if I try adb devices in the terminal, it gives me 'No command 'adb' found' error and asks if I made a spelling mistake.

@USER:~/android-sdk-linux/platform-tools$ ls
NOTICE.txt  adb  api  fastboot  source.properties  systrace
@USER:~/android-sdk-linux/platform-tools$ adb devices
No command 'adb' found, did you mean:
 Command 'cdb' from package 'tinycdb' (main)
 Command 'gdb' from package 'gdb' (main)
 Command 'dab' from package 'bsdgames' (universe)
 Command 'zdb' from package 'zfs-fuse' (universe)
 Command 'kdb' from package 'elektra-bin' (universe)
 Command 'tdb' from package 'tads2-dev' (multiverse)
 Command 'pdb' from package 'python' (main)
 Command 'jdb' from package 'openjdk-6-jdk' (main)
 Command 'jdb' from package 'openjdk-7-jdk' (universe)
 Command 'ab' from package 'apache2-utils' (main)
 Command 'ad' from package 'netatalk' (universe)
adb: command not found

我搜索了有关StackOverflow的几个问题和一些建议我使用apt-get install ia32-libs命令来获取一些32位库.但是,我在64位计算机上,因此不确定是否应该这样做.

I searched through a couple of questions on StackOverflow and some suggest I use apt-get install ia32-libs command to get some 32-bit libraries. However, I am on a 64-bit machine so not sure whether I should go for that or not.

我注意到的另一个奇怪的问题是,即使我导航到platform-tools文件夹并执行adb devices命令,也会遇到相同的错误.因此,我可能会在这里遗漏其他内容,而不是错误地设置了PATH条目.

Another strange issue I noticed is, even if I navigate to the platform-tools folder and execute adb devices command, I get the same error. So, I might be missing something else here rather than incorrectly setting the PATH entry.

我从下载页面并完成了上述所有步骤,但出现了相同的错误.

I tried both the ADB BUNDLE (.zip file) and SDK tools (.tgz file) from the download page and completed all the steps mentioned above but got same error.

我正在使用Ubuntu 12.04 LTS.

I am on Ubuntu 12.04 LTS.

推荐答案

我不确定这行代码是什么,为什么我必须这样做(因为博客说它有一些32位库,我在64位计算机).但这似乎对我有用.

I'm not sure what this line did and why I had to do that ('cuz the blogs say its some 32-bit libraries and I am on a 64-bit machine). But it seems to be working for me.

sudo apt-get install ia32-libs

当我执行此命令时,它安装/添加了大约5分钟的内容(从字面上看),然后一切正常.

When I executed this command, it installed/added some stuff for about 5 minutes (literally) and then everything worked.

关于, 反刍

这篇关于Ubuntu上的“未找到命令'adb'"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆