Error libGL.so: cannot open shared object file using Android emulator

后端 未结 6 1619
滥情空心
滥情空心 2021-02-01 02:23

I was trying to run android emulator in Ubuntu 12.04(64-bit). But, I got the following errors.

Starting emulator for AVD \'emulatr\'
Failed to load libGL.so
erro         


        
相关标签:
6条回答
  • 2021-02-01 02:55

    On Fedora

    sudo yum install mesa-libGL-devel
    
    0 讨论(0)
  • 2021-02-01 03:00

    As I'm using 64-bit Ubuntu 12.04. So, I did this

    $ sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
      libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
      libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
      python-markdown libxml2-utils xsltproc zlib1g-dev:i386
    $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
    
    0 讨论(0)
  • 2021-02-01 03:04

    This works for me on Ubuntu 14.04 64-bit:

    $ sudo apt-get install libgl1-mesa-dri
    $ sudo ln -sv /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
    
    0 讨论(0)
  • 2021-02-01 03:12

    http://learnedstuffs.wordpress.com/2012/07/17/fixing-ubuntu-error-failed-to-load-libgl-so/

    apt-get install libgl1-mesa-dev
    

    worked for me

    0 讨论(0)
  • 2021-02-01 03:12

    You don't need the development files for libgl1-mesa, so instead you should/could install libgl1-mesa-dri instead of libgl1-mesa-dev as suggested by others. This saves you a couple of MB of unnecessary files.

    Furthermore, the Android applications are either 32 bit or 64 bit.

    For a or a 32 bit Ubuntu you require the 32 bit SDK (as 64 bit does not work):

    sudo apt-get install libgl1-mesa-dri
    

    Same goes for a 64-bit Ubuntu with a 64-bit SDK.

    But for a 64 bit Ubuntu in combination with a 32 bit SDK, you need to specify that you require the 32 bit version of the package:

    sudo apt-get install libgl1-mesa-dri:i386
    
    0 讨论(0)
  • 2021-02-01 03:18

    I too had this problem (fedora 20), but the libGL files already existed on my filesystem. Based on an examination of the libraries on an older fedora 18 installation, I found that I could resolve the problem by providing a symbolic link for libGL.so linking to libGL.so.1.2.0.

    0 讨论(0)
提交回复
热议问题