LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-27-2015, 09:59 AM   #1
xeon123
Member
 
Registered: Sep 2006
Posts: 374

Rep: Reputation: 16
Cannot find libraries that I have installed


I am trying to compile Jikes 3.0.0, and despite I installed these libraries, I still get the error below. How I solve this?

Code:
sudo apt-get install gcc-multilib g++-multilib libunique-dev gconf-2.0 libgconf2-dev pango* gconf2*
The error that I have

Code:
     [exec] /usr/bin/ld: cannot find -lgconf-2
     [exec] /usr/bin/ld: cannot find -lgdk-x11-2.0
     [exec] /usr/bin/ld: cannot find -lpangocairo-1.0
     [exec] /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
     [exec] /usr/bin/ld: cannot find -lpango-1.0
     [exec] /usr/bin/ld: cannot find -lcairo
     [exec] /usr/bin/ld: cannot find -lgobject-2.0
     [exec] /usr/bin/ld: cannot find -lglib-2.0
     [exec] collect2: ld returned 1 exit status
 
Old 01-27-2015, 10:51 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,871
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
I don't think *asterisk* would work in apt-get install

For a start, install libglib2.0-dev:
Code:
apt-get install libglib2.0-dev
 
1 members found this post helpful.
Old 01-28-2015, 06:15 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Be sure that you have run this command: ldconfig

You must be root to do this. It might have been run already (by the install-script that apt-get invoked), but there's no harm in running it again.

When ld (the Linux program-loader ...) loads a program into memory, that program will usually specify a list of external libraries that it needs. Well, it would take much too long if ld actually had to search for all those libraries, one by one. So, instead, there is a cache.

This cache tells ld exactly where to find each library that any program might need. Therefore, ld doesn't have to "look" ... and, more to the point, it doesn't look. Instead, it refers to the cache to find "the answer." But then, it will complain (as you have already seen ...) if "the answer" turns out to be wrong ... if the library-file actually isn't "right there."

The ldconfig command rebuilds that cache. It locates every library that might be referred-to, determines where each one of them is, then constructs a cache-file which describes every one of the "alternate names" that might be used by any application. (Applications can be as specific or as generic as they wish to be ... "libxml, please" or "libxml.1.2.3, please" ... and ldconfig will figure all of it out and record all of these answers into the cache.)

So, if "an app can't find a library," but "you know that it's there," the cause of the problem will turn out to be an out-of-date cache.
 
Old 01-28-2015, 11:12 PM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,871
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Or, if you want to see the actual state, use option -v eg:
Code:
ldconfig -v | grep gdk_pixbuf
ldconfig -v | less -S
 
Old 01-28-2015, 11:36 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

I can think of a couple of possible cuases. Eg

- Are you sure those packages fully installed cleanly? (You can check with
"dpkg -l <packagename>"). The post install scripts should take care of running ldconfig automatically

- Did you run ./configure (or equivalent) again after installing the packages?

If something you are trying to compile has a large number of dependencies you might find it useful to use auto-apt to automatically install them for you.

Evo2.
 
  


Reply



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
How to find the version information of installed libraries say for example libdec2.a atulspma AIX 6 05-31-2017 07:32 PM
[SOLVED] Installed ffmpeg from source, want apt to see libraries (libavformat, etc) installed pngaudioguy Linux - Software 2 02-06-2014 04:40 AM
Find out the version information of installed libraries on AIX atulspma AIX 0 04-06-2009 02:22 AM
where are shared libraries installed? mkrems Linux - Software 2 05-30-2008 03:24 PM
Can't find gnome but have libraries installed silentwhispers SUSE / openSUSE 1 11-15-2004 11:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:31 AM.

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
Open Source Consulting | Domain Registration