Error "cannot find /usr/lib/libc_nonshared.a" when installing cmake

52 Views Asked by At

As apt-get cmake's version is old so I had to download and install a new version of cmake by myself.

I ran make after running the ./bootstrap command, then it showed error:

/usr/bin/ld: cannot find /usr/lib/libc_nonshared.a.

However, I couldn't find any libc_nonshared.a on my server, seemed like it was a quite old library.

I tried multiple cmake versions (3.25.1, 3.28.4, 3.29.0...) and they all required that static lib.

1

There are 1 best solutions below

3
André Lehto On

For whatever reason libc_nonshared.a seems to be missing, try reinstalling libc using:

sudo apt-get --reinstall install libc6-dev