Android Emulator on my system failed to find libGL.so
which was clearly available in both /usr/lib
and /usr/lib64
provided by mesa-libGL.i686
and mesa-libGL.x86_64
respectively. Here is the exact problem I had.
$emulator -avd nexus5 -qemu -m 512 --enable-kvm
$Failed to load libGL.so
$error libGL.so: cannot open shared object file: No such file or directory
$Failed to load libGL.so
$error libGL.so: cannot open shared object file: No such file or directory
After searching Google extensively, I failed to find something that worked for me. The two prominent answers that came back were as follows.
- Link
libGL.so.1
from/usr/lib
to thetools
‘ lib folder.ln -s /usr/lib/libGL.so.1 ~/android-sdk-linux_x86/tools/lib/libGL.so
- Another person suggested to install
mesa-libGL.i686
which I already had installed.yum install mesa-libGL.i686
Since they both failed. I tried to install various packages related to libGL
and I found mesa-libGL-devel.x86_64
.
So to solve Failed to load libGL.so
you need to run following command.
yum install mesa-libGL-devel.x86_64