Solving SDL init failure when running Android Emulator on Gentoo/Arch Linux

I have two computers running 64-bit Linux (one Gentoo box and one Arch Linux box), which I use for Android development. Both of them had the same problem when trying to start the Android emulator.

[bash]
emulator -avd test
[/bash]

It resulted in an error message like:

[bash]
SDL init failure, reason is: No available video device
[/bash]

Running strace when starting the emulator shows us the problem:

[bash]
strace emulator -avd test
[/bash]

The library /usr/lib32/libXrandr.so.2 is missing.

Install it on Arch Linux:

[bash]
sudo pacman -S lib32-libxrandr
[/bash]

Install it on Gentoo (pre-built 32-bit binaries):

[bash]
sudo emerge -av app-emulation/emul-linux-x86-sdl
[/bash]

All done!

This Post Has One Comment

Leave a Reply

Close Menu