6
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

On OpenSUSE, try zypper in Mesa-32bit to install the 32 bit version of the library.

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):
Aquarius_Girl
  • 1,235
  • 6
  • 27
  • 48
  • 2
    Google Earth is a 32-bit app. Do you have a 32-bit libGL? (I don't know the name for openSUSE, which is the distro you seem to be using) – Renan Jul 09 '12 at 04:47
  • @Renan Oh, great, I didn't know earth is a 32 bit app. I'll have to hunt for 32 bit libGL now. :) – Aquarius_Girl Jul 09 '12 at 04:52
  • 1
    /opt/google/earth/free/libGLU.so.1 looks promising. Isn't there a wrapper script that comes with google-earth and sets LD_LIBRARY_PATH appropriately? – Mat Jul 09 '12 at 05:12
  • The one in .../google/earth/... sounds like a good candidate, don't you think? – Mat Jul 09 '12 at 05:54
  • `LD_LIBRARY_PATH` is like `PATH`, you put directories into it. – Mat Jul 09 '12 at 05:58
  • You put the path to the libraries in it. – Mat Jul 09 '12 at 06:01
  • (Just to point out: `google-earth` is complaining about a missing `libGL`. The file found by locate is `libGLU`. I don't think setting the search path will be of any help, unless those are actually the same libs, despite the different name, *and* you create a link under the `libGL.so.1` filename.) – njsg Jul 09 '12 at 08:41

2 Answers2

3

Like Renan said, this is the result of a 32/64 bit mismatch. On OpenSUSE, try zypper in Mesa-32bit to install the 32 bit version of the library. In general, if you have the 64 bit version, you can use rpm -qf to find the package containing the library:

% rpm -qf /usr/lib64/libGLU.so.1
Mesa-7.11-11.4.2.x86_64

On OpenSUSE, the naming convention for 32bit-libraries is to append -32bit to the package name, so strip version and architecture information and add the suffix to obtain Mesa-32bit.

Ansgar Esztermann
  • 3,205
  • 1
  • 18
  • 21
  • thanks, but see the edit in the question. zypper is showing some errors. What could be the reasons? You said: "**On OpenSUSE, the naming convention for 32bit-libraries is to append -32bit to the package name, so strip version and architecture information and add the suffix to obtain Mesa-32bit.**" You mean I have to rename this lib like `Mesa-7.11-11.4.2-32bit`? You said "strip version" too, please show the example. – Aquarius_Girl Jul 09 '12 at 06:32
  • 1
    The version is probably `7.11-11.4.2`, and the architecture information is `x86_64`, so just like in the example Ansgar provided, you get `Mesa-32bit` if you strip the version and architecture information. It's as simple as that. Now that's a package name, you use the package manager to install a package named `Mesa-32bit`. – njsg Jul 09 '12 at 08:39
  • 2
    The zypper error messages point to a problem with the Google repositories. You can try to disable them (from Yast, for example), then Mesa-32bit should install from Suse itself. As to the Google repos, the cause of the problem is not clear to me; usually I fix these things by trying the URL with a web browser, then backing up along the path (i.e. remove the last directory and trying again) until the server delivers some kind of content (instead of an error page). However, with dl.google.com, I have to go way up, and then I do not get a directory listing, but a redirect to a non-repo page. – Ansgar Esztermann Jul 09 '12 at 21:26
  • @AnsgarEsztermann Thanks, your reply w.r.t that zypper error was helpful. I disabled the google repo and it did start downloading from the suse repo. I suggest that you add that suggestion in your answer so that future readers also get the benefit. – Aquarius_Girl Jul 10 '12 at 11:09
  • @njsg thanks for your explanation. I had previously read it horribly wrong way. – Aquarius_Girl Jul 10 '12 at 11:15
0

On my 64-bit box, I usually install any matching 32-bit libraries to my 64-bit libraries so I don't run into this problem. Sure, it's extra libraries I might not need or ever use, but then again, I don't usually get these errors either.

slafat01
  • 227
  • 1
  • 2