Skip to content

Compilation error "cannot find -lnsl" #1

Description

@pancho-villa

Hello,

I'm running ubuntu 25.10 and I tried to compile this package, here's what I did:

$ sudo apt install -y build-essential libssl-dev zlib1g-dev g++

build-essential is already the newest version (12.12ubuntu1).
libssl-dev is already the newest version (3.5.3-1ubuntu3.3).
zlib1g-dev is already the newest version (1:1.3.dfsg+really1.3.1-1ubuntu2).
g++ is already the newest version (4:15.2.0-4ubuntu1).
Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0

$git clone https://github.com/cfpandrade/bbcp.git
$ cd bbcp/src
$ make

And it errored out here:

NetLogger.c:1842:1: warning: old-style function definition [-Wold-style-definition]
 1842 | nl_writen (fd, ptr, nbytes)     /* use for writing n characters to a socket */
      | ^~~~~~~~~
Creating executable ../bin/amd64_linux6/bbcp ...
/usr/bin/ld: cannot find -lnsl: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:275: ../bin/amd64_linux6/bbcp] Error 1
make[3]: Leaving directory '/home/me/dev/repos/bbcp/src'
make[2]: *** [Makefile:219: makeLinuxx86_64] Error 2
make[2]: Leaving directory '/home/me/dev/repos/bbcp/src'
make[1]: *** [Makefile:196: Linux] Error 2
make[1]: Leaving directory '/home/me/dev/repos/bbcp/src'
make: *** [Makefile:159: all] Error 2

I

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions