Android SDK 使用 ADB 时遇到问题

Android SDK 使用 ADB 时遇到问题

因此,我安装了 Android SDK、Eclipse 和 ADT。设置 ADT 后第一次启动 Eclipse 时,弹出此错误:

[2012-05-29 12:11:06 - adb] /home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] 'adb version' failed!
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] Failed to parse the output of 'adb version':
Standard Output was:

Error Output was:
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

[2012-05-29 12:11:06 - adb] /home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] 'adb version' failed!
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] Failed to parse the output of 'adb version':
Standard Output was:

Error Output was:
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

我不太清楚这是怎么回事。感觉奇怪,好像缺少一个库。我使用的是 Ubuntu 12.04。对于 Android 开发人员来说,没有 adb 是一个相当大的打击。我该如何解决?

答案1

您需要在系统中安装 ncurses 32 位版本库

sudo apt-get install libncurses5:i386

除了 libncurses5,您可能还需要 libstdc++6。

sudo apt-get install libstdc++6:i386

使用命令

sudo apt-get install ia32-libs

您安装了许多对于解决您的问题没有用的库。

答案2

Android SDK 平台工具需要ia32-libs,它本身就是一个很大的库包:

sudo apt-get install ia32-libs

更新:

以下是Google 的最新指示关于如何安装Android SDK库依赖项:

如果您在开发机器上运行的是 64 位发行版,则需要先安装其他软件包。对于 Ubuntu 13.10 (Saucy Salamander) 及更高版本,请使用以下命令安装libncurses5:i386libstdc++6:i386zlib1g:i386软件包apt-get

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386

对于早期版本的 Ubuntu,ia32-libs请使用以下命令安装该包apt-get

apt-get install ia32-libs

答案3

如果libncurses尚未安装,则安装并重试。

sudo apt-get install libncurses5

答案4

相关内容