Android에서 libGL.so를로드하지 못했습니다.
내가 사용하고 우분투 12.04 오라클과 (정확한 천산갑)를 JDK 나에서 안드로이드 에뮬레이터 실행하고 때 7 및 이클립스 는이 오류를주고, :
[2012-07-04 02:52:10 - Emulator] error libGL.so: cannot open shared object file: No such file or directory
[2012-07-04 02:52:10 - Emulator] Failed to load libGL.so
또한 에뮬레이터가 매우 느립니다. 이 문제를 어떻게 해결할 수 있습니까?
~ / android-sdk-linux_x86에 Android SDK가 설치되어 있으므로 다음을 수행했습니다.
ln -s /usr/lib/libGL.so.1 ~/android-sdk-linux_x86/tools/lib/libGL.so
이것은 / usr / lib에 링크하는 것처럼 오류를 해결하지만 루트가 필요하지 않으며 핵심 시스템 디렉토리를 엉망으로 만들지 않습니다.
64 비트 Ubuntu 12.04에서는 다음과 같이하십시오.
$ 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
Ubuntu 12.04 64 비트를 사용하고 있습니다. 다음 명령을 사용하여 문제 해결
sudo ln -s /usr/lib32/fglrx/libGL.so.1.2 /usr/lib/libGL.so
참고 : 이는 AMD / ATI 그래픽 드라이버를 사용하는 사용자에게만 적용됩니다.
32 비트 Ubuntu 12.04 LTS의 경우 다음과 같이 작동했습니다.
sudo apt-get install libgl1-mesa-dev
다음 중 어느 것도 작동하지 않았습니다.
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
나를 위해 작동하는 것은 (ubuntu 12.04 64bit) 그냥 실행하는 것입니다.
sudo apt-get install libgl1-mesa-dev
libGL.so
디렉토리에있는 것을 찾았습니다./usr/lib/x86_64-linux-gnu/
32 비트 버전의 설치가 작동하지 않았습니다.
64 비트 Ubuntu 12.04에는 / usr / lib64가 없습니다. / usr / lib 전용입니다. 또한 내 컴퓨터에는 libGL.so가 없습니다. 대신 파일은 libGLEW.so입니다.
/usr/lib/LibGL.so를 설치하려면 다음을 실행할 수 있습니다. sudo apt-get install libgl1-mesa-dev
그러나 그것은 나를 위해 문제를 해결하지 못했습니다. 사실, 아마 내 시스템을 망 쳤을 것입니다.
이것은 64 비트 Ubuntu 12.10 및 ADT 번들에서 저에게 효과적이었습니다.
ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 ~/adt-bundle-linux-x86_64/sdk/tools/lib/libGL.so
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
설치 하지 않은 경우libgl1-mesa-glx
sudo apt-get install libgl1-mesa-glx
내 생각에 내가 옳았다 고 생각한다. 경고도없고 속도도 느려지지 않는다 ... 이것은 독점 드라이버에서는 작동하지 않을 수도있다.
libgl1-mesa-glx : i386이 설치되어 있는지 확인하십시오 (x64 SO 파일이 있더라도). 다음을 수행하십시오.
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/libGL.so
NVidia Optimus :
듀얼 그래픽 (intel 및 nvidia)에서 실행하면서 다음을 사용했습니다.
- Bumblebee를 설치합니다 ( https://wiki.ubuntu.com/Bumblebee#Installation 참조 ).
- 필요한 lib를 설치하십시오.
- nvidia 개별 카드에서 에뮬레이터를 실행합니다.
이것은 트릭을 수행해야합니다.
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
에뮬레이터를 실행하려면 optirun을 사용하십시오.
optirun emulator @<avd_name>
어제 Linux 만 설치했다는 경고를해야합니다. 그래서 내가 뭘하는지 잘 모르겠어요….
http://developer.android.com/sdk/installing/index.html 참조하여 ia32-libs를 설치하고 다음을 수행했습니다.
ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/i386-linux-gnu/mesa/libGL.so
이것이 제가이 문제를 해결하기 위해 한 전부입니다.
나는 Linux Mint 14-64 비트를 사용하며 나를 위해 작동했습니다. :) :
sudo apt-get install libgl1-mesa-glx libgl1-mesa-dev
On Ubuntu 12.04 64-bit, GNOME 3.4, I first referred to http://developer.android.com/sdk/installing/index.html and installed ia32-lib, which will generate /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
Then I run the below command and solved this problem:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/libGL.so
This is slightly different from gridstation's answer.
I guess there's no need to install the Mesa driver locally, which may cause issues with your real video drivers.
On Ubuntu 64 bit,
1. Check libGL,
$ locate libGL.so
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
2. Create a symlink where the SDK is installed
ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/local/android-studio/sdk/tools/lib/libGL.so
To make it work on a Ubuntu 12.10 (Quantal Quetzal) 64-bit, you have to do two things:
1) You have to initialize LD_LIBRARY_PATH
Example:
export LD_LIBRARY_PATH=~/tests/android/adt-bundle-linux-x86_64/sdk/tools/lib
Comments: change the path to your location
2) You have to create a symbolic link
a) Use locate libGL
to find the correct library:
rudy@vsolutions:~$ locate libGL
/home/rudy/opt/android/android-sdk-linux/tools/lib/libGLES_CM_translator.so
/home/rudy/opt/android/android-sdk-linux/tools/lib/libGLES_V2_translator.so
/usr/lib/i386-linux-gnu/libGLU.so.1
/usr/lib/i386-linux-gnu/libGLU.so.1.3.1
...
/usr/lib32/nvidia-current/libGL.so.304.43
b) Create the soft link
sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/libGL.so
Comments: use a 64-bit library on a 64-bit operating system!
Now start the emulator My system is Optimus, and I have installed Bumblebee. I can use "Intel Open Source Technology Center" "Mesa DRI Intel(R) Ironlake Mobile " "2.1 Mesa 9.0" or "NVIDIA Corporation" "GeForce GT 330M/PCIe/SSE2" "3.3.0 NVIDIA 304.43".
a) Intel
/home/rudy/tests/android/adt-bundle-linux-x86_64/sdk//tools/emulator64-arm -avd avd_42 -scale 0.46 -gpu on -verbose
b) Nvidia
optirun /home/rudy/tests/android/adt-bundle-linux-x86_64/sdk//tools/emulator64-arm -avd avd_42 -scale 0.46 -gpu on -verbose
Comments:
- I didn't see any difference between the Intel and the Nvidia cards... It is certainly because the emulator is not GPU intensive.
- On my system an Intel Core i5, it took almost 1 minute to start the emulator... Please be patient... I find the emulator rather fast after it is loaded (the 1 minute to wait). If you start the emulator from the Eclipse IDE, then the emulator does a software emulation (the GPU is off) and took 1 min 30 to start... It is much more slower than using the Intel or Nvidia cards!!!
verbose
is the parameter to use to display more diagnosticsoptirun
is the command to make use of the Nvidia on Bumblebee. If you don't have Bumblebee don't use it!avd
is a virtual devicegpu on
to make use of the graphical card
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.
I had the same issue. But in my case, I solved it another (I think, better) way.
In my situation (Lubuntu 13.10), it was enough to simply also install the library libgl1-mesa-dev
through Synaptic Package manager (the libgl1-mesa-dri
library was already installed by default when the Lubuntuu distro was set up).
That solves all the hassle of putting links from one file to the other and also prevents polluting your system:
- How will you know after several months (or years) what dedicated links you've put to keep the system running?
- What about a future updates, if you start to do those things yourself? Will something be broken/not updated due to "manual intervention"?
If you use the "system mechanism", it's all done for you. And correctly done. That's why those tools are there in the first place.
Best rgds,
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
I am using Ubuntu 12.04 64-bit. Linking /usr/lib64/libGLC.so.0
to /usr/lib64/libGL.so
seems to solve the problem.
EDIT: It stops the error messages, but the emulator is still slow for me.
This worked for me:
Restart the adb from the DDMS:
In Eclipse: Window > Open Perspective... > Other > DDMS. Select the emulator from the left side pane and select "Restart adb"
You can also restart the adb server from the terminal window.
android-sdk-linux/platform-tools/adb kill-server
android-sdk-linux/platform-tools/adb start-server
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
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
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!
I had this problem because I had checked "Use Host GPU" when creating my AVD. I tried it with that option unchecked and I was able to successfully start the emulator. This is acceptable for my testing purposes, but if using the host GPU is important you'll probably want to try some of the other solutions here.
I had the same problem. Reinstalling the Nvidia driver fixed the segmentation fault for me.
I solved this problem by reinstalling libgl1, both the 64- and 32-bit libraries:
$ sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-glx:i386
Background: Previously I switched from the free radeon driver back to fglrx. I guess this somehow screwed up my libgl1, because fglrx comes with its own version.
Besides, I think that the other solutions provided here are possibly dangerous, because it is wrong to symlink 32 bit shared libraries into the (64 bit) /lib/ directory.
Check if you have libgl1-mesa-*
packages installed. If so, install the libgl1-mesa-dev
package to get the unversioned shared objects.
You shouldn't have to do this -- it's the Android team's error. Give them a break, they're only Java developers.
참고URL : https://stackoverflow.com/questions/11332817/failed-to-load-libgl-so-on-android
'code' 카테고리의 다른 글
gsl 라이브러리에서 span과 array_view의 차이점은 무엇입니까? (0) | 2020.09.23 |
---|---|
HTML5 캔버스에 다각형을 그리는 방법은 무엇입니까? (0) | 2020.09.23 |
C / C ++에서 프로그래밍 방식으로 코어 덤프를 발생시키는 방법 (0) | 2020.09.23 |
JavaScript를 사용하여 HTML 테이블 데이터를 Excel로 내보내기 / JQuery가 Chrome 브라우저에서 제대로 작동하지 않습니다. (0) | 2020.09.23 |
Magento 제품 속성 값 가져 오기 (0) | 2020.09.23 |