• Home
  • Uncategorized
  • Solve error: libGL error: unable to load driver: i965_dri.so, driver pointer missing

Solve error: libGL error: unable to load driver: i965_dri.so, driver pointer missing

How to solve the problem of being unable to start the Android emulator of Android Studio in Ubuntu 17.10

The log says “libGL error: unable to load driver: i965_dri.so, driver pointer missing”.
Full log is as follows:

5:36 PM	Emulator: libGL error: unable to load driver: i965_dri.so
5:36 PM	Emulator: libGL error: driver pointer missing
5:36 PM	Emulator: libGL error: failed to load driver: i965
5:36 PM	Emulator: libGL error: unable to load driver: i965_dri.so
5:36 PM	Emulator: libGL error: driver pointer missing
5:36 PM	Emulator: libGL error: failed to load driver: i965
5:36 PM	Emulator: libGL error: unable to load driver: swrast_dri.so
5:36 PM	Emulator: libGL error: failed to load driver: swrast
5:36 PM	Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)
5:36 PM	Emulator: Major opcode of failed request:  155 (GLX)
5:36 PM	Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)
5:36 PM	Emulator: Value in failed request:  0x0
5:36 PM	Emulator: Serial number of failed request:  64
5:36 PM	Emulator: Current serial number in output stream:  65
5:36 PM	Emulator: emulator: ERROR: Missing initial data partition file: /home/joel/.android/avd/Oneplus_3_Virtual.avd/userdata.img
5:36 PM	Emulator: Process finished with exit code 1
5:37 PM	Gradle build finished in 1m 0s 234ms
5:38 PM	Emulator: libGL error: unable to load driver: i965_dri.so
5:38 PM	Emulator: libGL error: driver pointer missing
5:38 PM	Emulator: libGL error: failed to load driver: i965
5:38 PM	Emulator: libGL error: unable to load driver: i965_dri.so
5:38 PM	Emulator: libGL error: driver pointer missing
5:38 PM	Emulator: libGL error: failed to load driver: i965
5:38 PM	Emulator: libGL error: unable to load driver: swrast_dri.so
5:38 PM	Emulator: libGL error: failed to load driver: swrast
5:38 PM	Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)
5:38 PM	Emulator: Major opcode of failed request:  155 (GLX)
5:38 PM	Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)
5:38 PM	Emulator: Value in failed request:  0x0
5:38 PM	Emulator: Serial number of failed request:  64
5:38 PM	Emulator: Current serial number in output stream:  65

Find the location of your SDK from Settings>System Settings>Android SDK
To fix the error:

sudo apt-get install lib64stdc++6:i386 mesa-utils
cd /home/joel/Android/Sdk/emulator/lib64/
mv libstdc++ libstdc++.bak
ln -s /usr/lib64/libstdc++.so.6  libstdc++

Now try reloading the avd.
Source: Here