error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

15,405

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:
15,405

Related videos on Youtube

Aquarius_Girl
Author by

Aquarius_Girl

Arts and Crafts.stackexchange.com is in public beta now. Join us!

Updated on September 18, 2022

Comments

  • Aquarius_Girl
    Aquarius_Girl over 1 year
    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):
    
    • Renan
      Renan almost 12 years
      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)
    • Aquarius_Girl
      Aquarius_Girl almost 12 years
      @Renan Oh, great, I didn't know earth is a 32 bit app. I'll have to hunt for 32 bit libGL now. :)
    • Mat
      Mat almost 12 years
      /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
      Mat almost 12 years
      The one in .../google/earth/... sounds like a good candidate, don't you think?
    • Mat
      Mat almost 12 years
      LD_LIBRARY_PATH is like PATH, you put directories into it.
    • Mat
      Mat almost 12 years
      You put the path to the libraries in it.
    • kmacdonald
      kmacdonald almost 12 years
      (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.)
  • Aquarius_Girl
    Aquarius_Girl almost 12 years
    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.
  • kmacdonald
    kmacdonald almost 12 years
    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.
  • tiwari.vikash
    tiwari.vikash almost 12 years
    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.
  • Aquarius_Girl
    Aquarius_Girl almost 12 years
    @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
    Aquarius_Girl almost 12 years
    @njsg thanks for your explanation. I had previously read it horribly wrong way.