LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-27-2008, 10:57 AM   #1
david-sumo
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Rep: Reputation: 0
Question error while loading shared libraries: libgd.so (openSUSE 11)


Hi,

I have just moved a large webapplication from one server to another. The new server is openSUSE 11.
Everything's gone perfectly, except for a custom program that's run from php using shell_exec().

The program relies on GD to compare images. When the php page runs, I get the following PHP error:

error while loading shared libraries: libgd.so: cannot open shared object file: No such file or directory

A bit of Googling later, and it seems to be a path issue, that the program cannot find libgd.so. However, when I install GD and add the path, I am only given libgd.so.2 in /usr/lib - the error is definitely about libgd.so.

The program is compiled, and I don't have the source. Am I to believe that it's compiled against an older version of libgd? Or am I barking up the wrong tree?

I can rename libgd.so.2 to libgd.so and that suppresses that particular message, but then I get more errors - and I think that's a path I shouldn't really be going down!

Any help would be greatly appreciated.

Thanks,

David
 
Old 06-27-2008, 11:09 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Have you installed the gd-devel package? It contains /usr/lib/libgd.so.
 
Old 06-27-2008, 11:16 AM   #3
david-sumo
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
I've installed it now - and it's certainly removed the 'not found error'. However, now in my error_log, I see this:

/srv/www/cgi-bin/compareshell: /usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found (required by /srv/www/cgi-bin/compareshell)
/srv/www/cgi-bin/compareshell: /usr/lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by /srv/www/cgi-bin/compareshell)

Are there more packages I'm missing?
 
Old 06-27-2008, 11:19 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Have you compat-libstdc++ installed?
 
Old 06-27-2008, 11:22 AM   #5
david-sumo
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Ah, that's perfect, thanks for your help

Is there a way to find these things out, or is it just a mix of Google and 'pick it up as you go along'?
 
Old 06-27-2008, 11:34 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Just a matter of experience. But when you have an issue with some missing file, you can query which package provides that file (among all the packages provided by all the defined repositories). To do this you can use zypper from the command line, for example:
Code:
zypper wp libstdc++.so.5
zypper wp libgd.so
where the wp command of zypper stats for what-provides.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 03:19 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 07:03 AM
mplayer: error while loading shared libraries: libdvdread.so.3: cannot open shared ob Bruce Hill Slackware 6 12-11-2003 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:05 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
Open Source Consulting | Domain Registration