Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Runtime error: can't find libGLEW.so.1.10 in /usr/lib64 directory

  1. #1
    Intern Contributor
    Join Date
    Dec 2010
    Posts
    57

    Runtime error: can't find libGLEW.so.1.10 in /usr/lib64 directory

    I'm having an error when trying to run my application. The file exists in the /usr/lib64 folder but I can't figure out how to fix the error

    Code :
    $ ./release/runme 
    ./release/runme: error while loading shared libraries: libGLEW.so.1.10: cannot open shared object file: No such file or directory
    $ find /usr -name 'libGLEW*'
    /usr/lib64/libGLEW.so.1.10.0
    /usr/lib64/libGLEW.a
    /usr/lib64/libGLEW.so
    /usr/lib64/libGLEW.so.1.10
    find: `/usr/lost+found': Permission denied
    /usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.8.0
    /usr/lib/x86_64-linux-gnu/libGLEW.so.1.8
    /usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.8
    /usr/lib/x86_64-linux-gnu/libGLEW.so.1.8.0
    $ ldd ./release/runme
        linux-vdso.so.1 =>  (0x00007fffd6388000)
        libSDL2-2.0.so.0 => /usr/local/lib/libSDL2-2.0.so.0 (0x00007f2395f13000)
        libSDL2_image-2.0.so.0 => /usr/local/lib/libSDL2_image-2.0.so.0 (0x00007f2395cee000)
        libGL.so.1 => /usr/lib/nvidia-310/libGL.so.1 (0x00007f23959ca000)
        libGLEW.so.1.10 => not found
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f23956c7000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f23953c1000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f23951ab000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2394de3000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2394bc5000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f23949c1000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f23947b9000)
        libnvidia-tls.so.310.44 => /usr/lib/nvidia-310/tls/libnvidia-tls.so.310.44 (0x00007f23945b5000)
        libnvidia-glcore.so.310.44 => /usr/lib/nvidia-310/libnvidia-glcore.so.310.44 (0x00007f23920c2000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f2391d88000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f2391b75000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2396222000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f2391957000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f2391752000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f239154c000)
    $ ls -aR /usr/lib64/
    /usr/lib64/:
    .  ..  libGLEW.a  libGLEW.so  libGLEW.so.1.10  libGLEW.so.1.10.0  pkgconfig
     
    /usr/lib64/pkgconfig:
    .  ..  glew.pc

    As you can see, the GLEW files are essentially the only things in the /usr/lib64 directory. I have issued the ldconfig command as root but that has not fixed the problem. It seems like something needs to be added to /etc/ld.so.conf or one of the other conf files in /etc/ld.so.conf.d, or maybe I can just move these GLEW files into /usr/lib/x86_64-linux-gnu/ ?
    Last edited by PrestoChung; 08-27-2013 at 08:40 PM.

  2. #2
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    474
    Quote Originally Posted by PrestoChung View Post
    As you can see, the GLEW files are essentially the only things in the /usr/lib64 directory. I have issued the ldconfig command as root but that has not fixed the problem. It seems like something needs to be added to /etc/ld.so.conf or one of the other conf files in /etc/ld.so.conf.d, or maybe I can just move these GLEW files into /usr/lib/x86_64-linux-gnu/ ?
    ldconfig only scans the directories which are listed in ld.so.conf, or in files included from it. If GLEW is the only library in /usr/lib64, that suggests that your Linux distribution doesn't use that directory, so ld.so.conf probably doesn't reference it. You can either modify ld.so.conf or move the GLEW libraries. If the libraries aren't part of the distribution, they should probably go somewhere under /usr/local rather than under /usr.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,123
    Also, verify that your application is 64-bit, not 32-bit (run "file ./release/runme"). If it's 32-bit, it's not going to link with those 64-bit libs no matter what you do.

    Assuming it is 64-bit though, GClements has you covered. You can test to see if those libs would work but just aren't being searched with "env LD_LIBRARY_PATH=/usr/lib64 ./release/runme". If that works, then it's just updating your dynamic link library path cache, and he tells you how. If it doesn't, then I would "ls -l /usr/lib64/libGLEW*" and verify that libGLEW.so.1.10 is an actual file, or is a symlink that points (directly or indirectly) to the actually file ... probably /usr/lib64/libGLEW.so.1.10.0.

  4. #4
    Intern Contributor
    Join Date
    Dec 2010
    Posts
    57
    Okay I was able to do something I think is equivalent to 'env LD_LIBRARY_PATH=/usr/lib64 ./release/runme: I use Scons for building and was able to set an environment variable RPATH = '/usr/lib64' in my Sconscript file. With this modification after rebuilding I was able to run with no errors.

    When I finally do try and distribute the application should the library files such as libGLEW be moved into the executable directory itself? (assuming it's being run from a machine that hasn't built GLEW from makefile)

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    Which distro, if I may ask?

  6. #6
    Intern Contributor
    Join Date
    Dec 2010
    Posts
    57
    Just moved from Mint 12 to Mint 15

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    32-bits/64-bits? I guess, since you have a /usr/lib64 directory, you're running a 32-bit version. If so, why? Do you have a specific requirement to run a 32-bit installation? Did you install GLEW from the repo or compiled it yourself?

  8. #8
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    474
    Quote Originally Posted by PrestoChung View Post
    When I finally do try and distribute the application should the library files such as libGLEW be moved into the executable directory itself? (assuming it's being run from a machine that hasn't built GLEW from makefile)
    No. Linux isn't windows. Applications don't get packaged inside a single directory. Binaries go in "bin", libraries in "lib" (or lib32/lib64 on multi-arch setups), etc. Note that the loader won't, by default, search the directory containing the executable for libraries.
    As Mint has an official package for GLEW, you shouldn't be bundling it, nor linking against a version which you built yourself.

  9. #9
    Intern Contributor
    Join Date
    Dec 2010
    Posts
    57
    Quote Originally Posted by GClements View Post
    As Mint has an official package for GLEW, you shouldn't be bundling it, nor linking against a version which you built yourself.
    Silly me, I didn't even search for glew packages. I'm guessing the one I wanted was libglew-dev.



    Quote Originally Posted by thokra View Post
    32-bits/64-bits? I guess, since you have a /usr/lib64 directory, you're running a 32-bit version. If so, why? Do you have a specific requirement to run a 32-bit installation? Did you install GLEW from the repo or compiled it yourself?
    No it's the 64 bit version. I just went to the glew website and it didn't mention using apt/aptitude so I just downloaded the zip and ran 'sudo make install' from the directory. This created the lib64 directory and the glew files were the only files in there.

  10. #10
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1,099
    sudo apt-get install libglew-dev

    (since quantal. before it'd be libglew1.6-dev or libglew1.5-dev)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •