Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/usr/bin/ld cannot find -lbsd

Tags:

c

makefile

This is the error I get when I try and make the apue.3e source code from the book Advanced Programming in the Unix Environment.

/lib -lapue -pthread -lrt -lbsd
/usr/bin/ld: cannot find -lbsd
collect2: error: ld returned 1 exit status
make[1]: *** [badexit2] Error 1
make[1]: Leaving directory `/home/john/Documents/apue.3e/threads'
make: *** [all] Error 1

I've looked through similar errors that all seemed to be missing symbolic links to files, but I can't figure out what -lbsd is. When I try to change directory to /usr/bin/ld it doesn't exist. Is -lbsd supposed to be in this directory or is it that ld just can't find it? I've tried to refrain from posting stupid questions on here, but I can't stand to be stuck on this any longer. Any help is greatly appreciated.

like image 434
Skewjo Avatar asked Oct 29 '13 23:10

Skewjo


1 Answers

sudo apt-get install libbsd-dev

like image 115
user2975811 Avatar answered Oct 25 '22 04:10

user2975811