ubuntu 64 android adb,Ubuntu 64 with Android 64 Bundle cannot find adb executable

问题

I'm experiencing the following problem when trying to run adb on Ubuntu 12.10, x86_64:

[2013-02-19 20:56:04 - adb] Unexpected exception 'Cannot run program

"/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb": error=2,

No such file or directory' while attempting to get adb version from

'/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb'

I located adb, tried chmod +x adb and it just doesn't work. I also tried chmod +x platform-tools/

and chmod +x tools/. After that I tried ./adb

I've Googgled for the problem. They were talking about ia32 package. Ubuntu can't locate that package nor the ia32 multi arch whatever.

System is Ubuntu 12.10 64 and I downloaded adt-bundle-linux-x86_64.zip package and just unzip it.

What am I doing wrong ? Thank you!

回答1:

On Debian 7 I bumped in the same issue.

Diagnosis:

edb@lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb

not a dynamic executable

edb@lapelidb:~/today$ file /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb

/opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped

Solution: Adding support for 32-bit support and the required 32-bit libraries:

edb@lapelidb:~/today$ sudo dpkg --add-architecture i386

edb@lapelidb:~/today$ sudo apt-get update

edb@lapelidb:~/today$ sudo apt-get install libc6:i386 libstdc++6:i386

Et voila:

edb@lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb

linux-gate.so.1 => (0xf772a000)

librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf770a000)

libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf7706000)

libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf76ec000)

libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf7600000)

libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf75da000)

libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf75bd000)

libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf745a000)

/lib/ld-linux.so.2 (0xf772b000)

回答2:

I'm using Ubuntu 12.04 LTS version. I've tried the steps suggested by 'amo-ej1', but my 'dpkg' didn't have 'add' or 'architecture' options.

However, the following worked for me:

1) Install 'adb' and 'fastboot' provided by the following third-party PPA.

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install android-tools-adb android-tools-fastboot

2) Replace the copy of 'adb' and 'fastboot' provided by the official Android SDK with those installed from the above step:

cp /usr/bin/adb /sdk/platform-tools/adb

cp /usr/bin/fastboot /sdk/platform-tools/fastboot

3) Restart(re-execute) your eclipse binary.

Full credits:

http://www.webupd8.org/2012/08/install-adb-and-fastboot-android-tools.html

IMPORTANT EDIT (ALTERNATE SOLUTION):

Although the above would resolve your error (and you can proceed with the Android App tutorial), as I found, ADT will also need 'aapt' (another 32-bit binary) located in:

/sdk/build-tools/android-x.x/

And unfortunately, the link that I provided above doesn't provide this binary.

So, here's my other solution:

1) Update your system

Open 'Update Manager' => 'Settings' => 'Updates

Check "Recommended Updates (precise updates)"

Update the updates that are being shown

2) Install ia32-libs

sudo apt-get install ia32-libs

And I finally was able to install 'ia32-libs'. To know why 'ia32-libs' wouldn't install in the first place, please read the answer posted by 'slangasek' here:

https://askubuntu.com/questions/136394/cannot-install-ia32-libs

回答3:

On Ubuntu 12.10 x86_64 the package to run 32bits are ia32-libs and ia32-libs-multiarch.

If you type

file adb

You'll see that adb is a 32 bit file on a 64 bit system. You need the ia32 packages to emulate and run this file. But you can't!

The problem right now is you cannot download these packages, they're trying to convert it to something I guess x86_64. Here you can read about convert in the package NEWS:

summary of the conversion:

"ia32-libs (20090808ubuntu27) precise; urgency=low

ia32-libs is now a transitional package depending on

ia32-libs-multiarch,

the i386-only package which depends on all the 32-bit library packages

previously included in ia32-libs itself. As a result, ia32-libs will be

uninstallable for some time during the precise cycle, while the dependent

libraries are updated to be coinstallable using multiarch. Developers

are encouraged to help with the conversion process for these libraries,

described at:

http://wiki.debian.org/Multiarch/Implementation

-- Steve Langasek "

So if you try to edit your source.list file to grab it from older repo you'll break packages. So ubuntu 12.10 people have to wait or adb is compile or whatever to 64 bit.

edit:

Debian 7.0 will support multiarch where x64 version can run x32 binary.

source: http://www.debian.org/News/2013/20130504

回答4:

I use debian_x64

add i386 lib

dpkg --add-architecture i386

sudo apt-get update

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

ldd /home/yourname/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb

when you found “android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory”

you can try

sudo apt-get install ia32-libs

sudou apt-get install zlib.i686

restart your computer

and try again

回答5:

unzip that file with this:

sudo tar xvfz adt-bundle-linux-x86.zip -C /opt/android

than run that code:

sudo chown -R your_user_name /opt/android

i think it will work

来源:https://stackoverflow.com/questions/14972641/ubuntu-64-with-android-64-bundle-cannot-find-adb-executable

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值