CentOS 8 - /usr/bin/ld: cannot find -lnsl
7
votes
1
answer
14930
views
I am working on a new CentOS 8 server to replace an aging CentOS 6 server. Most everything is working and I am having the primary users test out everything they use the server for. Many errors have come and gone but this one not so much.
The user is running a gcc command:
gcc process-hdf.c -o process-hdf.exe -I/usr/include/hdf -L/usr/lib64 -lmfhdf -ldf -ljpeg -lz -lnsl -lm
which ends up failing with
/usr/bin/ld: cannot find -lnsl
I have done the following so far:
- Ran ld -l nsl
, same error as with gcc
.
- Verified that libnsl
is installed within /usr/lib64
.
- Verified both packages, libnsl
and libnsl2
are installed.
- Checked the ldconfig
cache and both versions of libnsl
are listed.
- Removed the libnsl
package, other packages depend on libnsl2
. No change when removed.
Any info would be appreciated.
Asked by Chris Woelkers
(241 rep)
Jan 4, 2021, 08:33 PM
Last activity: Apr 26, 2025, 07:02 AM
Last activity: Apr 26, 2025, 07:02 AM