LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   a path problem (https://www.linuxquestions.org/questions/linux-newbie-8/a-path-problem-69032/)

Santas 06-30-2003 09:53 AM

a path problem
 
i´m trying to install a program and it doesn´t find the libpng library, but i have instaled yet and it says, that its installed i have to put FIXED/bin in the path
how can i do this? and what does FIXED means?

Mara 06-30-2003 04:15 PM

You got 'FIXED/bin' from readme/help etc, right? I think FIXED is a place to put the real directory. For example, when you have it in /usr/local/bin, FIXES will be /usr/local.

TheLinuxDuck 07-02-2003 10:26 AM

The VERY first thing that I would do is run ldconfig before you try to compile the program. ldconfig will update the shared library links, so if anything new was installed, ldconfig will make sure it's available to use.

second thing first, visually verify that libpng is installed in a library path that is commonly accessable (which are /lib, /usr/lib, and any of the shared library directories defined in /etc/ld.so.conf).

You can complete this by this bash one-liner:
Code:

# for i in /lib /usr/lib `cat /etc/ld.so.conf | tr '\n' ' '`; do echo "--searching dir $i"; find $i -name "*png*"; done
That will show you any place in the common library directories that the libpng exists. If ld.so.conf doesn't exist, then simply replace the `cat...` part with /usr/local/lib, as:

Code:

# for i in /lib /usr/lib /usr/local/lib; do echo "--searching dir $i"; find $i -name "*png*"; done
If it returns no libpng files, then your problem is that the libraries are either not installed, or installed in a funky place. You're going to have to find out where they are installed. One way to do this is:

Code:

find / -type f -name "libpng*"
But, I warn you, this search will take a while.

Assuming that we did find the libraries in the common directories, you need to verify that the proper files exist.

Does libpng.a exist? If not, then you cannot build static binaries (binaries where the libpng info is built-in). You'll have to recompile libpng with the --enable-static command line option to configure, and reinstall.

Does libpng.so exist? If not, then you cannot build shared binaries (where the libpng info is linked from the libpng.so file, making the binary smaller). You'll have to recompile libpng with the --enable-shared option passed to configure, and reinstall (the static and shared options can be passed to configure together).

If libpng.so exists, it should be a symlink to libong.so.2 (I'm running version 1.0.3, which is not the current version, so the library will be 2.1.0.3. newest version will be (I think) 3.1.0.15)

And libpng.so.2 should symlink to linpng.2.1.0.3.

If any of that doesn't make sense, or you don't get how to fix or verify that this stuff is set correctly, simply copy/paste the results of ls -o /path/to/libpng* in a reply, and someone here will tell you.

If the libraries are installed, and all the above stuff is right, then the next step is to make sure that the compilation process is able to find the libraries.

What is the exact error message you're getting when trying to compile? What command line did you run?

Santas 07-02-2003 01:31 PM

when i run ls -o /usr/lib/libpng* i get this:

-rw-r--r-- 1 root 169668 jun 23 2002 /usr/lib/libpng12.a
lrwxrwxrwx 1 root 13 jul 1 16:04 /usr/lib/libpng12.so -> libpng12.so.0
lrwxrwxrwx 1 root 19 jul 1 16:11 /usr/lib/libpng12.so.0 ->libpng12.so.0.1.2.2
-rwxr-xr-x 1 root 160827 jun 23 2002 /usr/lib/libpng12.so.0.1.2.2
lrwxrwxrwx 1 root 10 jul 1 16:04 /usr/lib/libpng.a -> libpng12.a
lrwxrwxrwx 1 root 19 jul 1 16:04 /usr/lib/libpng.so -> libpng12.so.0.1.2.2
lrwxrwxrwx 1 root 18 jul 1 16:13 /usr/lib/libpng.so.2 -> libpng.so.2.1.0.13
-rwxr-xr-x 1 root 155887 jun 23 2002 /usr/lib/libpng.so.2.1.0.13
lrwxrwxrwx 1 root 19 jul 1 16:11 /usr/lib/libpng.so.3 -> libpng12.so.0.1.2.2
lrwxrwxrwx 1 root 19 jul 1 16:11 /usr/lib/libpng.so.3.1.2.2 -> libpng12.so.0.1.2

and the error i get when i run ./configure is:

checking for sdl-config... no
checking for SDL - version >= 1.2.0... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.

TheLinuxDuck 07-02-2003 01:40 PM

I'm not exactly sure where you're seeing that libpng is the problem with the configure, but that error message is telling you that SDL is not installed. In case you aren't aware, SDL is a graphics library available at http://www.libsdl.org/index.php

You'll have to go there, d/l the latest version, and compile/install it before you can configure/compile the program you're currently trying to compile.

Santas 07-02-2003 01:45 PM

I have installed SDL-1.2.5-1.i386.rpm and i have the same problem

TheLinuxDuck 07-02-2003 03:40 PM

If it is installed, then which sdl-config should return a valid path/file. What does it return?

If it doesn't find it, then try locating it (locate sdl-config). If it still doesn't find it, then it didn't get installed, or is not in the locate database (in which case, you can run updatedb and wait forever for it to finish, then try again).

If it does find it:
Is it in a typical location? (like /usr/bin or /usr/local/bin)?
If so, what is the command line you're passing to configure?
If not, you're going to have to tell configure where it is, either by running "export SDL_CONFIG=/pathandfilename/to/sdl-config", or by passing the dir into configure via --libdir=.


All times are GMT -5. The time now is 01:39 AM.