Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
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):
share|improve this question
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 9 '12 at 4:47
    
@Renan Oh, great, I didn't know earth is a 32 bit app. I'll have to hunt for 32 bit libGL now. :) –  TheIndependentAquarius Jul 9 '12 at 4: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 9 '12 at 5:12
    
The one in .../google/earth/... sounds like a good candidate, don't you think? –  Mat Jul 9 '12 at 5:54
    
LD_LIBRARY_PATH is like PATH, you put directories into it. –  Mat Jul 9 '12 at 5:58
show 2 more comments

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
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. –  TheIndependentAquarius Jul 9 '12 at 6: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 9 '12 at 8: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 9 '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. –  TheIndependentAquarius Jul 10 '12 at 11:09
    
@njsg thanks for your explanation. I had previously read it horribly wrong way. –  TheIndependentAquarius Jul 10 '12 at 11:15
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.