LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   System can't find a library that is there (https://www.linuxquestions.org/questions/linux-newbie-8/system-cant-find-a-library-that-is-there-683845/)

dctopcat 11-16-2008 01:40 PM

System can't find a library that is there
 
I am trying to get my Xwindows to work and I am getting the following error:
error while loading shared libraries:libfreetype.so.6:cannot open shared object file:no such file or directory

But if I do a which libfreetype.so.6, it is found in /usr/lib.

I think that I have a config problem where the library is not being recognized properly, but I haven't been able to resolve it. I am using openSUSE 10.3. Thanks in advance for any help or ideas.

Tinkster 11-16-2008 01:47 PM

What's the output of ldconfig -v ?
What does ls -l /usr/lib/libfreetype.so.6 say?


Cheers,
Tink

dctopcat 11-16-2008 03:07 PM

Quote:

Originally Posted by Tinkster (Post 3343961)
What's the output of ldconfig -v ?
What does ls -l /usr/lib/libfreetype.so.6 say?


Cheers,
Tink

ldconfig -v shows it as a link libfreetype.so.6->libfreetype.so.6.3.16. If there is something else you are looking for in this, please let me know as the file is over 1000 lines long and since I can't run a browser on that machine right now I can't cut and paste it. I'll be glad to look through it if you can give me some idea of what I am looking for.

For the second question, when I do a ls -l /usr/lib/libfreetype.so.6 it shows it as a link
/usr/lib/libfreetype.so.6->libfreetype.so.6.3.16

When I do a ls -l on libfreetype.so.6.3.16 it shows it as a file of size 529780

Thanks for any help.

colucix 11-16-2008 03:29 PM

What is the output of /usr/bin/Xorg? This should give a list of the shared objects on which the Xorg executable depends along with their absolute path. Please use code tags to embed the copy/pasted output. This is mine on openSuSE 10.3:
Code:

# ldd /usr/bin/Xorg
        linux-gate.so.1 =>  (0xffffe000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7f3f000)
        libXfont.so.1 => /usr/lib/libXfont.so.1 (0xb7ed9000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7e6a000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb7e66000)
        libfontenc.so.1 => /usr/lib/libfontenc.so.1 (0xb7e5f000)
        libz.so.1 => /lib/libz.so.1 (0xb7e4c000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7e45000)
        libm.so.6 => /lib/libm.so.6 (0xb7e20000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e14000)
        libc.so.6 => /lib/libc.so.6 (0xb7ce1000)
        /lib/ld-linux.so.2 (0xb7f60000)


dctopcat 11-16-2008 03:48 PM

Quote:

Originally Posted by colucix (Post 3344045)
What is the output of /usr/bin/Xorg? This should give a list of the shared objects on which the Xorg executable depends along with their absolute path. Please use code tags to embed the copy/pasted output. This is mine on openSuSE 10.3:
Code:

# ldd /usr/bin/Xorg
        linux-gate.so.1 =>  (0xffffe000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7f3f000)
        libXfont.so.1 => /usr/lib/libXfont.so.1 (0xb7ed9000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7e6a000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb7e66000)
        libfontenc.so.1 => /usr/lib/libfontenc.so.1 (0xb7e5f000)
        libz.so.1 => /lib/libz.so.1 (0xb7e4c000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7e45000)
        libm.so.6 => /lib/libm.so.6 (0xb7e20000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e14000)
        libc.so.6 => /lib/libc.so.6 (0xb7ce1000)
        /lib/ld-linux.so.2 (0xb7f60000)


My outout is very similar to the one you have here except for the libfreetype.so.6 line saying "not found". Also, I do not have the linux-gate.so.1 or the libgcc_s.so.1 in my list. Unfortunately I cannot do a copy/paste right now because I cannot get to a graphical interface at all. I may have not said that the way I got to this problem was when I was trying to do a startx command.

Thanks for your help.

colucix 11-16-2008 04:22 PM

Ok. The startx command is a shell script which (most likely) runs the /usr/bin/Xorg executable. I think the problem is simply that for some reason your system misses the libfreetype.so link. Check it and eventually re-create the link as
Code:

# cd /usr/lib
# ln -s libfreetype.so.6.3.16 libfreetype.so


dctopcat 11-16-2008 06:00 PM

Quote:

Originally Posted by colucix (Post 3344106)
Ok. The startx command is a shell script which (most likely) runs the /usr/bin/Xorg executable. I think the problem is simply that for some reason your system misses the libfreetype.so link. Check it and eventually re-create the link as
Code:

# cd /usr/lib
# ln -s libfreetype.so.6.3.16 libfreetype.so


I tried this and it doesn't seem to help. I think I am getting close to the "reinstall" point.

dctopcat 11-17-2008 09:12 AM

Quote:

Originally Posted by dctopcat (Post 3344180)
I tried this and it doesn't seem to help. I think I am getting close to the "reinstall" point.

Well, I finally did a system repair and ended up adding a bunch of system libraries. Somewhere in that process it fixed itself.

colucix 11-17-2008 09:23 AM

Nice to hear good news! :)


All times are GMT -5. The time now is 12:18 AM.