尝试通过 PlayOnLinux 安装 GTA San Andreas 但出现错误:
0009:err:wgl:init_opengl Failed to load libGL: libGL.so.1: cannot open shared object file: No> such file or directory
0009:err:wgl:init_opengl OpenGL support is disabled.
已经尝试过几十种方法安装 libGL i386,但总是遇到“依赖地狱”
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt install libgl1-mesa-glx:i386
我得到了依赖性错误:
libgl1-mesa-glx:i386 is already the newest version (20.0.8-0ubuntu1~20.04.1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libgl1-mesa-glx:i386 : Depends: libgl1:i386 but it is not going to be installed
Depends: libglx-mesa0:i386 but it is not going to be installed
我的发行版:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
我不知道如何解决这个依赖错误,以启用 OpenGL 支持在我的 Ubuntu Mate 64 位中玩 32 位游戏 GTA San Andreas。
答案1
我也有同样的问题。我用两个步骤解决了它。
首先,我尝试找到 在哪里libGL
。使用locate libGL.so
,发现:
/snap/gnome-3-28-1804/128/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/gnome-3-28-1804/128/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/snap/gnome-3-28-1804/145/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/gnome-3-28-1804/145/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libGL.so
/snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu/libGL.so
/snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/snap/scrcpy/269/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/scrcpy/269/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/snap/scrcpy/274/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/scrcpy/274/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/snap/wine-platform-runtime/212/usr/lib/i386-linux-gnu/libGL.so.1
/snap/wine-platform-runtime/212/usr/lib/i386-linux-gnu/libGL.so.1.0.0
/snap/wine-platform-runtime/212/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/wine-platform-runtime/212/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGL.so.1
/snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGL.so.1.0.0
/snap/wine-platform-runtime/216/usr/lib/x86_64-linux-gnu/libGL.so.1
/snap/wine-platform-runtime/216/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
/usr/lib/x86_64-linux-gnu/libGL.so
/usr/lib/x86_64-linux-gnu/libGL.so.1
/usr/lib/x86_64-linux-gnu/libGL.so.1.7.0
我将libGL.so
和其他 opengl 库从链接/snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/
到/usr/lib/i386-linux-gnu/
。也许你应该通过 snap 安装 wine-platform-runtime。
做这个:
sudo ln -s /snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so.1
sudo ln -s /snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGL.so.1.0.0 /usr/lib/i386-linux-gnu/libGL.so.1.0.0
sudo ln -s /snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGLX.so.0 /usr/lib/i386-linux-gnu/libGLX.so.0
sudo ln -s /snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGLX.so.0.0.0 /usr/lib/i386-linux-gnu/libGLX.so.0.0.0
sudo ln -s /snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGLdispatch.so.0 /usr/lib/i386-linux-gnu/libGLdispatch.so.0
sudo ln -s /snap/wine-platform-runtime/216/usr/lib/i386-linux-gnu/libGLdispatch.so.0.0.0 /usr/lib/i386-linux-gnu/libGLdispatch.so.0.0.0
它仍然不起作用,并且出现了一个新问题。(但这一步对我来说是必要的。)
err:wgl:X11DRV_WineGL_InitOpenglInfo couldn't initialize OpenGL, expect problems
然后,第二步:
我的nvidia驱动版本是460,以460为例。
sudo apt install libnvidia-gl-460:i386
而且在安装的时候如果提示nvidia-driver-460
要被删除,那就不好了,应该同时makenvidia-driver-460
和exist。我通过删除 cuda repo 重新安装解决了这个问题。(详情?见:libnvidia-gl-460:i386
libnvidia-gl-460:i386
nvidia-driver-460
NVIDIA 440.64 32 位库包破坏 64 位驱动程序包,并对此表示感谢。)
和我的dpkg -l|grep nvidia
:
ii libnvidia-cfg1-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-460 460.73.01-0ubuntu0.18.04.2 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA libcompute package
ii libnvidia-compute-460:i386 460.73.01-0ubuntu0.18.04.2 i386 NVIDIA libcompute package
ii libnvidia-decode-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-460:i386 460.73.01-0ubuntu0.18.04.2 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-460:i386 460.73.01-0ubuntu0.18.04.2 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-460:i386 460.73.01-0ubuntu0.18.04.2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-460:amd64 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-460 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA compute utilities
ii nvidia-dkms-460 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA DKMS package
ii nvidia-driver-460 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-460 460.73.01-0ubuntu0.18.04.2 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-460 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.16~0.18.04.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 450.51.05-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-460 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA driver support binaries
ii xserver-xorg-video-nvidia-460 460.73.01-0ubuntu0.18.04.2 amd64 NVIDIA binary Xorg driver
希望它能对你有所帮助。