Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

could not find libsocket.so and libintl.so [closed]

Tags:

c

I am trying to compile some tools which used to analyze HTTP logs, when ever I type make getting following error and I am not able to locate libsocket.so and libintl.so in my file system,

gcc -o showtrace showtrace.o logparse.o utils.o -lsocket -lnsl -lintl -ldl -lm
/usr/bin/ld: cannot find -lsocket
/usr/bin/ld: cannot find -lintl
collect2: ld returned 1 exit status

how to solve this problem please help.

like image 220
Ashu Avatar asked Nov 21 '25 11:11

Ashu


1 Answers

I'm not really sure about libintl, but libsocket is a library that only exists on System V-style Unixes (e.g. Solaris, HP-UX). If you're on Linux or a BSD-derivative (that includes Mac OS X), then you don't need to link to libsocket because sockets are implemented in libc which is linked in by default. Try linking without -lsocket and -lintl.

like image 55
Fred Foo Avatar answered Nov 24 '25 00:11

Fred Foo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!