Failed to load libGL.so on Android

前端 未结 26 1243
旧巷少年郎
旧巷少年郎 2020-12-04 06:05

I am using Ubuntu 12.04 (Precise Pangolin) with the Oracle JDK 7, and when I am running the Android emulator from Eclipse, it\'s giving this error:

[201         


        
相关标签:
26条回答
  • 2020-12-04 06:36

    On 64 bit Ubuntu 12.04, there is no /usr/lib64. It is /usr/lib only. Also, on my machine, libGL.so isn't present. Instead the file is libGLEW.so

    To install /usr/lib/LibGL.so you can run: sudo apt-get install libgl1-mesa-dev

    However, it didn't solve the problem for me. In fact, it probably screwed up my system.

    0 讨论(0)
  • 2020-12-04 06:40

    Referring to http://developer.android.com/sdk/installing/index.html, I installed ia32-libs and did:

    ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/i386-linux-gnu/mesa/libGL.so
    

    That's all I did to solve this problem.

    0 讨论(0)
  • 2020-12-04 06:42

    On 64-bit Ubuntu 12.04, do it like 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
    

    Source: Installing required packages (Ubuntu 12.04)

    0 讨论(0)
  • 2020-12-04 06:42

    For 32-bit Ubuntu 12.04 LTS, this worked:

    sudo apt-get install libgl1-mesa-dev
    

    None of the following worked:

    cd /usr/lib/i386-linux-gnu/mesa/
    sudo ln -s libGL.so.1.2 libGL.so 
    sudo ln -s libGL.so.1.2 /usr/lib/libGL.so
    ln -s libGL.so.1.2 ~/android/android-sdk-linux/tools/lib/libGL.so
    
    0 讨论(0)
  • 2020-12-04 06:42

    I found the folder for libGL by the command "locate"

    It turned out to be in /usr/lib/i386-linux-gnu/

    ~$ locate libGL
    /usr/lib/i386-linux-gnu/libGLEW.so.1.8
    /usr/lib/i386-linux-gnu/libGLEW.so.1.8.0
    /usr/lib/i386-linux-gnu/libGLEWmx.so.1.8
    /usr/lib/i386-linux-gnu/libGLEWmx.so.1.8.0
    /usr/lib/i386-linux-gnu/libGLU.so.1
    /usr/lib/i386-linux-gnu/libGLU.so.1.3.1
    /usr/lib/i386-linux-gnu/mesa/libGL.so.1
    /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0

    0 讨论(0)
  • 2020-12-04 06:45

    I am using Ubuntu 12.04 64-bit. Using the following command to solve the problem

     sudo ln -s /usr/lib32/fglrx/libGL.so.1.2 /usr/lib/libGL.so
    

    Note: This is applicable only to those who use the AMD/ATI graphic drivers.

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