56

Since Ubuntu 13.10 no longer has ia32-libs I cannot get my android development environment running on a clean install of 13.10.

The error is ~/android-studio/sdk/build-tools/android-4.2.2/aapt": error=2, No such file or directory

This file does exist and is executable but it is a 32bit executable.

In previous installs I just installed ia32-libs to fix this but this solution no longer works for Ubuntu 13.10.

I have tried solutions proposed by askubuntu questions eg. this one https://askubuntu.com/questions/107230/what-happened-to-the-ia32-libs-package

but it isn't working for me. From that askubuntu.com answer I see I should install separate packages with

sudo apt-get install package:i386 

but I don't know which packages to install to make the android tools work again.

Has anyone else solved this problem and or does anyone have a list of packages which need to be installed for the android tools?

Community
  • 1
  • 1
maiatoday
  • 795
  • 2
  • 7
  • 15

5 Answers5

85

Another way(without adding i386 architecture)...

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo apt-get install lib32z1

Ref: Fix Android adb on Ubuntu 13.10 64bit

JafarKhQ
  • 8,676
  • 3
  • 35
  • 45
  • 3
    this may still work in 13.10. But distro maintainers disagree with Adam regarding "cleanliness" of this solution. After all ia32-libs was just a temporary fix till the proper multiarch support was implemented. – Alex P. Nov 05 '13 at 15:18
  • E: Package 'lib32stdc++6' has no installation candidate E: Package 'lib32gcc1' has no installation candidate E: Unable to locate package lib32ncurses5 – digit plumber Dec 10 '13 at 05:17
  • 1
    Please use the solution by Alex P., it is way better. – Gerhard Burger Feb 03 '14 at 12:30
  • @Gerhard Burger: why? – jul Apr 29 '14 at 14:57
  • 3
    @jul Take for example libc6-i386. Try `apt-cache show libc6-i386` in a terminal, and look for the line `Architecture:`. As you can see it's a 32-bit binary in a 64-bit package source. Now, if you do `apt-cache show libc6:i386` you can see that it is a 32-bit binary in a 32-bit package source (what you would expect), also you can see the multiarch flag, and that if you will install it, it will replace `libc6-i386`. – Gerhard Burger Apr 29 '14 at 15:26
  • i got a dependencies error, i removed it by going to software center and adding all repository, updating ubuntu and running the command. just in case someone also gets the same error as i do – Ray Aug 12 '14 at 05:28
  • Works on Debian jessie too – Rodion V Mar 03 '17 at 15:28
66

While dpkg --add-architecture i386 command is not needed in the current version of Ubuntu (13.10), it is required in the current Debian versions (7.x) and it will be required in the future Ubuntu versions as well. So I am going to leave it in. Just ignore it for Ubuntu 13.10.

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

Update: aapt indeed requires zlib so I added it to the list. But you should not be needing any lib32 packages.

Alex P.
  • 30,437
  • 17
  • 118
  • 169
  • 3
    I needed to add sudo apt-get install lib32stdc++6 lib32z1 to get this working. Here are some links, [google+ thread](https://plus.google.com/u/0/105743916299158661374/posts/YL57cir9BKu) and [askubuntu thread](http://askubuntu.com/questions/147400/problems-with-eclipse-and-android-sdk) – maiatoday Oct 23 '13 at 07:36
3

It's just a matter giving sdk files the necessary permissions.

 sudo chmod -R +x /path/to/android-sdk-linux

Restart Android Studio and see if that fix it.

Permission issues typically occur when you copy/move sdk files from a NTFS partition or copying from another computer.

Gayan Weerakutti
  • 11,904
  • 2
  • 71
  • 68
2

On Ubuntu 14.04 LTS x64 and buildToolsVersion 21/22 it was enough to execute the following:

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

The error I was getting:

Execution failed for task ':core:processReleaseResources'.
> A problem occurred starting process 'command '/home/user/androidSDK/android-sdk/build-tools/21.1.2/aapt''
1

install 13.04 ia32-libs (raring ringtail)

instructions: http://bisonf.wordpress.com/2013/10/19/ubuntu-13-10-how-to-properly-install-ia32-libs-and-ia32-libs-multiarch/

ralfs
  • 21
  • 1
  • 1
    paste the full solution instead of just providing a link. – alex Feb 02 '14 at 20:09
  • The reason that you want to post a full solution, even though it may seem repetitive, is that your link may (and probably will at some point) become dead. At that point, your answer is worthless because it has no content. See this [Stack Exchange help article](http://meta.stackexchange.com/help/how-to-answer). – Clayton Apr 30 '14 at 12:25