LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2005, 10:20 PM   #1
Scrob
LQ Newbie
 
Registered: Feb 2005
Posts: 18

Rep: Reputation: 0
Question about libraries


I have a general question about Installing programs in Linux. I have tried to install mplayer for the last week with no success, I have downloaded the source file, and tried to use ./configure --enable-gui
It returns with the following error:
Error: The GUI requires GTK devel packages (which were not found).

Anyway, I went to download GTK source and started to compile, and I am getting the following error:

checking for glib-2.0 >= 2.6.0 atk >= 1.0.1 pango >= 1.7.0... Requested 'glib-2.0 >= 2.6.0' but version of GLib is 2.4.8

configure: error: Library requirements (glib-2.0 >= 2.6.0 atk >= 1.0.1 pango >= 1.7.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

The weird thing about this is that I just installed glib 2.6.0 from source using ./configure, and make, and finally make install. It gave me no errors. All of my downloaded programs go to /home/scrob/Downloads/ and I am running the configure option from withing that directory after I have extracted the package.

I am very confused on how linux installs programs, but I am starting to make some sense out of the whole process, and I have the following questions:
1. Do I have to log in as root to use ./configure? I'm not talking about su, which I already use from within my user login, I'm talking logging out as user, and logging in as root altogether.
2. Is there a certain directory where I need to run the ./configure from to make sure that the packages are going to their default locations, or does that happen automatically?
3. Is there some sort of command that will show what libraries the system currently has installed?
4. Is there a file that I need to edit to reflect new libraries once they are installed so that the system will find them by default when running ./configure? If so, where do I look to find installed libraries? (I'm really lost on this one, is there a good website that explains the way that linux works as far as directory permissions, default install paths etc...?)

Thanks in advance!

I am using Fedora Core 3 and have updated all available updates.

Last edited by Scrob; 02-20-2005 at 10:21 PM.
 
Old 02-20-2005, 10:54 PM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
Re: Question about libraries

Quote:
Originally posted by Scrob
I have a general question about Installing programs in Linux. I have tried to install mplayer for the last week with no success, I have downloaded the source file, and tried to use ./configure --enable-gui
It returns with the following error:
Error: The GUI requires GTK devel packages (which were not found).

Anyway, I went to download GTK source and started to compile, and I am getting the following error:

checking for glib-2.0 >= 2.6.0 atk >= 1.0.1 pango >= 1.7.0... Requested 'glib-2.0 >= 2.6.0' but version of GLib is 2.4.8

configure: error: Library requirements (glib-2.0 >= 2.6.0 atk >= 1.0.1 pango >= 1.7.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

The weird thing about this is that I just installed glib 2.6.0 from source using ./configure, and make, and finally make install. It gave me no errors. All of my downloaded programs go to /home/scrob/Downloads/ and I am running the configure option from withing that directory after I have extracted the package.

I am very confused on how linux installs programs, but I am starting to make some sense out of the whole process, and I have the following questions:
1. Do I have to log in as root to use ./configure? I'm not talking about su, which I already use from within my user login, I'm talking logging out as user, and logging in as root altogether.
2. Is there a certain directory where I need to run the ./configure from to make sure that the packages are going to their default locations, or does that happen automatically?
3. Is there some sort of command that will show what libraries the system currently has installed?
4. Is there a file that I need to edit to reflect new libraries once they are installed so that the system will find them by default when running ./configure? If so, where do I look to find installed libraries? (I'm really lost on this one, is there a good website that explains the way that linux works as far as directory permissions, default install paths etc...?)

Thanks in advance!

I am using Fedora Core 3 and have updated all available updates.
I'll answer your questions first before the rant

1). you only need to be root to install the built packages, not to run configure or make them ( this is a security risk, although not a big one, but something to keep in mind as it is possible for someone to attack you through your compiler).

2). you can run configure from anywhere, that is not what determines where things go.

3). for you, you'll want to use "rpm -qa | grep <library name> " to query for a specific package on your system. ( more on this down below)

4). /etc/ls.so.conf is it. if you install a new lib in say /opt/misc ( you'd need to do something like ./configure --prefix=/opt/misc which tells configure to set up the Makefile to install things to /opt/misc. this way, executables would end up in /opt/misc/bin, libraries in /opt/misc/lib, etc... but after your done you need to add the line /opt/misc/lib in /etc/ld.so.conf and run (as root) "ldconfig" to update your shared library cache. With linux, as always, there are other ways to accomplish the same thing but this is the "correct" way and since your a little newer to the gnu/linux world I'd suggest you stick with this for now)

now for your other problems. what you did is install a new glib in /usr/local. whenever you do ./configure (with no arguments), the installation prefix defaults to /usr/local ( this will pretty much always be true of applications, but some other packages ( like services and things like that) could be different, so keep in mind we are gonna look at this from an application standpoint). Now, your system came with a glib-2.x already installed in /usr and you installed a new one in /usr/local. This is where your problem is, as you cannot have two conflicting libraries installed at once (errrr... you can but thats a little beyond what we need to be doing here, plus, you need to know how to manipulate the entire environment of the system in order to do this. in short: don't mix incompatible versions on the same system). So... go back to that glib-2.6.0 directory and (as root since this will modify your system outside your home directory) run "make uninstall" to remove glib-2.6.0.

I am using Fedora Core 3 and have updated all available updates. [/B][/QUOTE]
Your second problem is your trying to install the wrong packages. MPlayer needs:

glib-1.2.x
glib-1.2.x-devel
gtk+-1.2.x
gtk+-1.2.x-devel
libpng
libpng-devel

installed. notice the glib and gtk versions are 1.2 not 2.x. These two ( as in glib-2.x and glib-1.2.x) can be installed on the same system without any conflicts ( completely different versions, my above comment was about mixing libs like glib-2.4.8 and glib-2.6.0 - won't work).

so fire up whatever package manager you want ( or just get em off of the install cd's, they'll be on there) and get the packages above. the -devel packages contain the things you need to compile against the libraries ( this is a common practice with rpm based distro's ( and apt-get ), to split the packages into multiple pieces, and it, well, sucks).

remember, check your system first to see if it has a lib already on it before trying to install a new one, and if you install a new one, it's always better to upgrade the one you have in the same location.

Next, I'd *highly* suggest when compiling to make rpm's out of your builds and install them instead of running "make install". This make it easier to upgrade/remove later on and also records the package in the rpm database ( this is important if you want to continue using rpm's in the future). there are multiple ways to do this, such as rpmbuild and checkinstall.

Also, learn how to check your system for what is and is not installed. On fedora, I'd imagine there is some gui tool somewhere in your menu's that would make this easy, or go with the above "rpm -qa | grep <package>. remember, rpm distro's split things so something like "libstdc++" which normally comes with g++ could be split off into it's own package independant of g++.

And lastly ( sorry I know it's long ), with your pkg-config problems above, this is a path problem. when you install to /usr/local ( which is what happens when you run ./configure with no arguments), the glib-2.0.pc file that configure was looking for above was located in /usr/local/lib/pkgconfig, but pkg-config does not know how to find this directory by default. you can get around this by:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

keep in mind that will last only for the session your in currently. to make it permanent, you'd have to add it to your .bashrc or /etc/profile or something similar.
 
Old 02-20-2005, 10:59 PM   #3
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Rep: Reputation: 30
> 1. Do I have to log in as root to use ./configure? I'm not talking
> about su, which I already use from within my user login, I'm
> talking logging out as user, and logging in as root altogether.

In most cases, a simple su to log in as root from a console
will do. However, if the installer wants to pop up a GUI window,
it'll crash. Next then, try

xhost +x (so a new GUI window will pop up)

and run the installer again. If this fails, then try to
log in as root as the last resort.

Sheng-Chieh
 
Old 02-21-2005, 10:03 PM   #4
Scrob
LQ Newbie
 
Registered: Feb 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Mplayer gui problems.

Thanks, that all worked and I was able to install mplayer. No I have another question.

When I go to run gmplayer it gives me the following error

MPlayer 1.0pre6-3.4.2 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE


vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
gmplayer: symbol lookup error: /usr/lib/libgdk-1.2.so.0: undefined symbol: XListInputDevices

Any ideas what this could be?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
libraries/headers locations question (compiling) shilo Slackware 1 10-04-2005 12:01 PM
shared libraries question rhb327 Slackware 2 09-23-2005 10:49 AM
simple rpm and libraries question whitehole Fedora 1 10-18-2004 10:58 AM
Shared libraries question...need help tarballed Linux - General 3 03-15-2003 01:04 PM
Libraries Question toxic53 Programming 2 09-29-2001 12:18 AM


All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration