Failed to load libGL.so on Android

前端 未结 26 1244
旧巷少年郎
旧巷少年郎 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:49

    I had the same problem. Reinstalling the Nvidia driver fixed the segmentation fault for me.

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

    Similar to user1289608, I was able to do a sym link from an existing install of Mesa:

    sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/libGL.so
    
    0 讨论(0)
  • 2020-12-04 06:50
    sudo apt-get install libgl1-mesa-dev
    cd ~/Development/adt-bundle-linux-x86_64-20140321/sdk/tools/lib
    unlink libGL.so 
    ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 libGL.so
    

    that's it!

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

    NVidia Optimus:

    Running on dual graphics (intel and nvidia), I used the following:

    1. Install Bumblebee (see: https://wiki.ubuntu.com/Bumblebee#Installation)
    2. Install the required lib.
    3. Run the emulator on the nvidia discrete card.

    This should do the trick:

    sudo add-apt-repository ppa:bumblebee/stable
    sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
    sudo apt-get update 
    sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic 
    sudo apt-get install ia32-libs
    

    Whenever you wish to run the emulator, just use optirun:

    optirun emulator @<avd_name>
    

    I should give a warning that I only installed Linux yesterday. So I don't really know what I'm doing….

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

    OSError: libGL.so: cannot open shared object file: No such file or directory

    It may appear on Linux systems when you try to launch VNL for the first time. To solve it, create (as administrator) a new link in /usr/lib :

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

    If you have a 64-bit Linux, use /usr/lib64 instead .

    First check that you actually have libGL.so.1.2 in /usr/lib or /usr/lib64 ; it might be called libGL.so.1 or something else instead, or located in another directory, depending on the video drivers.

    You can use locate libGL to find the correct file to link to.

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

    For my Debian 7 'Wheezy' installation I used the following command:

    ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 opt/android/tools/lib/libGL.so
    
    0 讨论(0)
提交回复
热议问题