Cannot launch emulator on Linux (Ubuntu 15.10)

2019-01-03 21:24发布

I try to launch emulator but it outputs into log:

libGL error: unable to load driver: r600_dri.so 
libGL error: driver pointer missing 
libGL error: failed to load driver: r600 
libGL error: unable to load driver: swrast_dri.so 
libGL error: failed to load driver: swrast 
X Error of failed request:  GLXBadContext   
Major opcode of failed request:  155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request:  47
Current serial number in output stream:  46 
libGL error: unable to load driver: r600_dri.so 
libGL error: driver pointer missing 
libGL error: failed to load driver: r600 
libGL error: unable to load driver: swrast_dri.so 
libGL error: failed to load driver: swrast 
X Error of failed request:  GLXBadContext
Major opcode of failed request:  155 (GLX)
Minor opcode of failed request:  6 (X_GLXIsDirect)   
Serial number of failed request:  47   
Current serial number in output stream:  46 
libGL error: unable to load driver: r600_dri.so 
libGL error: driver pointer missing 
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so 
libGL error: failed to load driver: swrast 
X Error of failed request:  BadValue (integer parameter out of range for operation)   
Major opcode of failed request:  155 (GLX)   
Minor opcode of failed request:  24 (X_GLXCreateNewContext)   
Value in failed request:  0x0   
Serial number of failed request:  33   
Current serial number in output stream:  34 
QObject::~QObject: Timers cannot be stopped from another thread emulator: WARNING: Increasing RAM size to 1GB

How to fix it? I read topics with similar errors but it doesn't help me.

13条回答
▲ chillily
2楼-- · 2019-01-03 21:45

Use "Software" in the Emulated Performance Graphics option, in the AVD settings. Very simple solution.

查看更多
成全新的幸福
3楼-- · 2019-01-03 21:46

I had the similar problems with using i965_dri.so and swrast_dri.so, I wasn't able to change to software graphics in the GUI.

So I went to the emulator's folder (Show on Disk link in AVDM) and found the config.ini

Here I just changed the following line to stop it from using GPU:

hw.gpu.enabled=no
查看更多
Animai°情兽
4楼-- · 2019-01-03 21:48

$ cd ~/Android/Sdk/emulator/lib64/libstdc++ $ mv libstdc++.so.6 libstdc++.so.6.bak $ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6

查看更多
放荡不羁爱自由
5楼-- · 2019-01-03 21:49

better locate your system default libstdc++.so.6 using the command locate libstdc++.so.6

And Then Take a back up of the android sdk version of the file in ~/Android/Sdk/tools/lib64/libstdc++/

And create a soft link for libstdc++.so.6 with the same name in the above path replacing the existing one pointing to the default file in the system

This way we do not need restart the emulator every time from command line.

查看更多
Luminary・发光体
6楼-- · 2019-01-03 21:49

I was also having a lot of problems to launch AVD on my machine. Struggled with using system libs, creating symlinks to local libraries, etc...

What really made it work for me was to install the nvidia drivers with

sudo apt install nvidia-340

My distro (note I'm not using Ubuntu 15.10):

$ uname -a
Linux ruapehu 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Ubuntu 16.04.1 LTS \n \l

Make sure you check the nvidia package suitable for you, as Ubuntu offers different flavors. For instance:

$ sudo apt list "nvidia-[0-9][0-9][0-9]" 
Listing... Done
nvidia-304/xenial 304.131-0ubuntu3 amd64
nvidia-331/xenial 340.96-0ubuntu3 amd64
nvidia-340/xenial,now 340.96-0ubuntu3 amd64 [installed]
nvidia-346/xenial 352.63-0ubuntu3 amd64
nvidia-352/xenial 361.42-0ubuntu2 amd64
nvidia-361/xenial,now 361.42-0ubuntu2 amd64

I tested the list in a bottom-up strategy, from 361 until I found one that worked (340, in my case).

Hope that helps.

查看更多
We Are One
7楼-- · 2019-01-03 21:51
$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6

it's worked for me

查看更多
登录 后发表回答