I am using Ubuntu 12.04 (Precise Pangolin) with the Oracle JDK 7, and when I am running the Android emulator from Eclipse, it's giving this error:
[2012-07-04 02:52:10 - Emulator] error libGL.so: cannot open shared object file: No such file or directory
[2012-07-04 02:52:10 - Emulator] Failed to load libGL.so
Also the emulator is very slow. How can I solve this problem?
I have the Android SDK installed into ~/android-sdk-linux_x86, so I did:
ln -s /usr/lib/libGL.so.1 ~/android-sdk-linux_x86/tools/lib/libGL.so
This solves errors just like linking to /usr/lib does, but it doesn't require root and doesn't mess with core system directories.
On 64-bit Ubuntu 12.04, do it like this:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Source: Installing required packages (Ubuntu 12.04)
I am using Ubuntu 12.04 64-bit. Using the following command to solve the problem
sudo ln -s /usr/lib32/fglrx/libGL.so.1.2 /usr/lib/libGL.so
Note: This is applicable only to those who use the AMD/ATI graphic drivers.
For 32-bit Ubuntu 12.04 LTS, this worked:
sudo apt-get install libgl1-mesa-dev
None of the following worked:
cd /usr/lib/i386-linux-gnu/mesa/
sudo ln -s libGL.so.1.2 libGL.so
sudo ln -s libGL.so.1.2 /usr/lib/libGL.so
ln -s libGL.so.1.2 ~/android/android-sdk-linux/tools/lib/libGL.so
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With