Friday 7 October 2016

Android - libGL error: unable to load driver: nouveau_dri.so

Hello,

This is the error you might see:
  • Cannot launch AVD in emulator.
    Output:
    libGL error: unable to load driver: nouveau_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: nouveau
    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:  49
      Current serial number in output stream:  48
    libGL error: unable to load driver: nouveau_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: nouveau
    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:  49
      Current serial number in output stream:  48

Here is how to resolve it:
  1. sudo apt-get install lib64stdc++6 (if it is not installed)
  2. cd ~/Android/Sdk/tools/lib64/libstdc++
  3. mv libstdc++.so.6 libstdc++.so.6.original
  4. ln -s /usr/lib64/libstdc++.so.6 ~/Android/Sdk/tools/lib64/libstdc++
  5. sudo apt-get install mesa-utils (if it is not installed)

Source: http://android.stackexchange.com/questions/145437/reinstall-avd-on-ubuntu-16-04

Good luck!

4 comments: