Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying build the Android source using these packages. ButI am getting this error:

$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
[sudo] password for asdf: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libc6-dev-i386
E: Unable to locate package lib32ncurses5-dev
E: Unable to locate package ia32-libs
E: Unable to locate package lib32readline5-dev
E: Unable to locate package lib32z-dev

I tried to download & install say libc6-dev-i386 debian package form here. But when I double click on the .deb file Ubuntu Software Manager says wrong architecture 'amd64'.

(My OS: 32-bit Ubuntu 10.10 (updated), Processor: AMD phenom II 64-bit.)

share|improve this question
Please edit as you see fit. Thank you – eagleye Feb 11 '11 at 0:56
up vote 3 down vote accepted

I believe that the page is a little out of date. There are a lot of different workarounds that are floating around the net. I'll try to summarize what worked for me.

Two helpful, if imperfect, pages are located here:

First, it looks like you'll probably want to use java6 and not java5, judging by some of the group threads . So if you see java5 in instructions, know that you'll need to substitute in either the sun java6 or open java 6.

Here are the packages I needed for my 32-bit system:

sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk ant gcc-multilib g++-multilib

After those are in place, build repo :

sudo curl -o /usr/local/bin/repo   
sudo chmod a+x /usr/local/bin/repo

Then in your build directory:

repo init -u git://    
repo sync

The wildartist site continues:

If you encounter the message “command not found” then you can do it with the following commands:

$ sudo sh /usr/local/bin/repo init -u git://
$ sudo sh /usr/local/bin/repo sync

It will take much time to get the code even though the line is fast as the project itself is really huge. After the long waiting, you will find that the checkout process has been ended. The next thing to do is MAKE to build the project. But you will meet a message that the Java version is not correct and the build process fails. Then you can modify the build/core/ file to change the text ”1.5″ to “1.6″.

At this point you should have the dependencies and the code take care of. You will still need to make .

Because the code base and supporting libraries and components are changing, it's hard to keep the instructions perfectly up-to-date, which is why there are so many conflicting how-to's for this process.

share|improve this answer
I am afraid, It even doesn't work. My OS is 10.10 32 bit (processor 64bit arch). for the first command it is unable to locate: ib32z1-dev lib32ncurses5-dev also it can't locate ia32-libs. – eagleye Feb 11 '11 at 0:44
@newcomer See if you can get these: sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk ant git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev – belacqua Feb 11 '11 at 1:17
@jgbelacqua: liblz-dev install was successful and it says libncurses5-dev was installed before. So I need three more packages lib32readline5-dev libc6-dev-i386 ia32-libs (fyi I have jdk installed in my machine and I can run android app in emulator using eclipse) – eagleye Feb 11 '11 at 1:40
Try libc6-dev and libreadline5-dev . You won't need ia32-libs with your 32-bit OS. – belacqua Feb 11 '11 at 1:52
Ok, everything installed. but when I try to initialize a repo client using: $ repo init -u git:// it shows error **Traceback (most recent call last): File "/home/mashruf/bin/repo", line 91, in <module> import readline ImportError: No module named readline ** – eagleye Feb 11 '11 at 2:00

You're trying to install some 32-bit packages which are not available in your repositories.You can not install i386 packages since your configuration is 64-bit. Try finding similar packages in Synaptic package manager.For example search for libc6-dev and install suitable package for your system.

share|improve this answer
he is actually running a 32-bit OS. I was also confused. – belacqua Feb 11 '11 at 1:22
Yeah!I saw the update now.Fortunately it's solved. – Pedram Feb 11 '11 at 6:26

EDIT: See jgbelacqua's answer. Getlibs should probably become a community wiki instead or something...


getlibs /path/to/binary
getlibs -l
getlibs -p i386packagename
getlibs -w
getlibs -i /home/chris/i386package.deb

@Pedram: I'm afraid your answer is actually misleading.

share|improve this answer
Thanks for the nice link. But when I put $ sudo getlibs -w‌​.deb. It shows: E: Unable to locate package E: Couldn't find any package by regex '' – eagleye Feb 10 '11 at 23:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.