LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-17-2012, 05:03 PM   #1
thodori
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Rep: Reputation: Disabled
/usr/bin/ld: cannot find -lsocket


Hi, my name is Ted and I am very much a Linux newbie. Taking a Computer Networking course and am getting /usr/bin/ld: cannot find -lsocket, when I compile. Any input would be appreciated.
 
Old 06-17-2012, 06:28 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
Welcome to LQ.

'lsocket' = libsocket.so or libsocket.a
... Which software are you compiling ? ?


Packages containing libsocket.* , examples :
camsource, libcamsource*, libferris-context_sockets, pfe-forth-devel, ctrlproxy.

http://rpm.pbone.net/ > Search > Advanced Search : libsocket.so

.
 
Old 06-18-2012, 02:32 PM   #3
thodori
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
I compiling on my universities unix system using:
gcc -o tcpc tcpc.c -lnsl -lsocket
 
Old 06-18-2012, 04:11 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
The libraries "libnsl.so", "libnsl.a" are provided by the main library = libc.
The development package must be installed. (glibc-devel ? libc6-dev ?).

Ask somebody at the university, which "Unix OS" you are using.
Name and version.

Also : It is impossible to guess which libsocket.* it is about.
Please do a search http://rpm.pbone.net/ :
Include all OS, all versions to decide the required library.

.

Last edited by knudfl; 06-18-2012 at 04:34 PM.
 
  


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
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 02:59 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 12:08 AM
Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? DigaMe Linux - Security 2 11-12-2004 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 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