LinuxQuestions.org
Review your favorite Linux distribution.
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 11-05-2011, 03:11 PM   #1
conrad143
LQ Newbie
 
Registered: Nov 2011
Location: Cheam, Surrey
Distribution: Ubunto 11.04 April 2011
Posts: 4

Rep: Reputation: Disabled
Question "libcurl.so.4: cannot open shared object file: No such file or directory"


Hi, I am new to Linux Programming and am studying the WROX Book "Professional Linux Programming".Chapter 5 (Network Programming), page 141 describes installation of libcurl libraries and using libcurl library functions in a simple program called getweb.c.

LibcURL used for Network Programming functions in the libcurl libraries. Supposed to be easier than using raw sockets. The 'socket' programming examples all worked brilliantly.


The installation of libcurl libraries 7.15.5 seemed to work using
$ tar -zxvf curl-7.15.5.tar.gz
cd curl-7.15.5
./configure
make
make test
make install (after logging back in as "root")

The getweb.c program compiled ok.

But.. when trying to run it I get:
"libcurl.so.4: cannot open shared object file: No such file or directory "

I modified the ld.so.config file (as 'root' user to save changes), but I am not sure whether just adding the line "include /usr/local/lib" beneath the existing one did anything. It still does not work and gives the same error message.

Can anyone help with this please?

Thank you.
 
Old 11-05-2011, 05:06 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,640

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Quote:
I modified the ld.so.config file (as 'root' user to save changes), but I am not sure whether just adding the line "include /usr/local/lib" beneath the existing one did anything. It still does not work and gives the same error message.
You didn't say your distro, but usually you can add the the path, without the "include" statement, to the newly installed library in /etc/ld.so.conf (not ld.so.config), or in a file in the directory /etc/ld.so.conf.d.
Whatever way you'll use, you need to run
Code:
ldconfig
afterwards

Regards
 
Old 11-06-2011, 04:52 AM   #3
conrad143
LQ Newbie
 
Registered: Nov 2011
Location: Cheam, Surrey
Distribution: Ubunto 11.04 April 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
My Linux version is UBUNTU 11.04.

Thank you for your comments - it didn't say run 'ldconfig' in the book but I've seen this mentioned amongst a ton of other information on other sites and forums.

I'll give it a go and get back to you.

Thanks.
 
Old 11-06-2011, 05:30 PM   #4
conrad143
LQ Newbie
 
Registered: Nov 2011
Location: Cheam, Surrey
Distribution: Ubunto 11.04 April 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
ldconfig

bathory,

'ldconfig' fixed the problem "libcurl.so.4: cannot open shared object file: No such file or directory".

Thank you.
 
  


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
gdb says "cannot open shared object file" mihk Programming 1 05-31-2009 01:10 PM
Error: "libdmx.so.1: cannot open shared object file: No such file or directory" ESC201 Linux - Software 4 11-01-2008 08:38 PM
cannot open shared object file: No such file or directory (0) SQLSTATE=00000?? suliman_shah Programming 3 08-23-2007 01:02 PM
Tip: handling "cannot open shared object file..." sundialsvcs Linux - Newbie 1 03-06-2006 12:57 PM
libawt.so: libXp.so.6: cannot open shared object file: No such file or directory man26 *BSD 0 09-10-2004 08:34 AM


All times are GMT -5. The time now is 04:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration