加载共享库时出错:libGL.so.1:无法打开共享对象文件:没有这样的文件或目录

Aqu*_*irl 6 64bit opensuse libraries linker dynamic-linking

anisha@linux-y3pi:~/> google-earth 
./googleearth-bin: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

anisha@linux-y3pi:~/> locate libGL
/opt/google/earth/free/libGLU.so.1
/usr/lib64/libGL.so
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so.1.2
/usr/lib64/libGLU.so.1
/usr/lib64/libGLU.so.1.3.070802

anisha@linux-y3pi:~/> uname -a
Linux linux-y3pi 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

在 OpenSUSE 上,尝试使用 Mesa-32bit 中的 zypper 来安装 32 位版本的库。

linux-y3pi:# zypper in Mesa-32bit
Retrieving repository 'google-chrome' metadata [\]
Failed to download /repodata/repomd.xml from http://dl.google.com/linux/chrome/rpm/stable/x86_64
Abort, retry, ignore? [a/r/i/?] (a): r
Retrieving repository 'google-chrome' metadata [|]
Failed to download /repodata/repomd.xml from http://dl.google.com/linux/chrome/rpm/stable/x86_64
Abort, retry, ignore? [a/r/i/?] (a): i
Retrieving repository 'google-chrome' metadata [error]
Repository 'google-chrome' is invalid.
Can't provide /repodata/repomd.xml : User-requested skipping of a file
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Disabling repository 'google-chrome' because of the above error.
Retrieving repository 'google-earth' metadata [/]
Failed to download /repodata/repomd.xml from http://dl.google.com/linux/earth/rpm/stable/i386
Abort, retry, ignore? [a/r/i/?] (a): r
Failed to download /repodata/repomd.xml from http://dl.google.com/linux/earth/rpm/stable/i386
Abort, retry, ignore? [a/r/i/?] (a):
Run Code Online (Sandbox Code Playgroud)

Ans*_*ann 3

正如 Renan 所说,这是 32/64 位不匹配的结果。在 OpenSUSE 上,尝试zypper in Mesa-32bit安装该库的 32 位版本。一般来说,如果您有 64 位版本,则可以使用以下命令rpm -qf查找包含该库的包:

% rpm -qf /usr/lib64/libGLU.so.1
Mesa-7.11-11.4.2.x86_64
Run Code Online (Sandbox Code Playgroud)

在 OpenSUSE 上,32 位库的命名约定是附加-32bit到包名称后,因此去掉版本和体系结构信息并添加后缀以获得Mesa-32bit.

  • zypper 错误消息表明 Google 存储库存在问题。您可以尝试禁用它们(例如,从 Yast),然后 Mesa-32bit 应该从 Suse 本身安装。至于Google repos,我不清楚问题的原因;通常我会通过使用网络浏览器尝试 URL 来修复这些问题,然后沿着路径备份(即删除最后一个目录并重试),直到服务器提供某种内容(而不是错误页面)。然而,对于 dl.google.com,我必须向上走,然后我没有得到目录列表,而是重定向到非存储库页面。 (2认同)