When I am bootstrapping a node, I'm getting this error:

102 Views Asked by At

When I am bootstrapping a node, I'm getting this error: /opt/chef/embedded/bin/ruby; error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

I executed below command knife bootstrap 172.31.6.156 --ssh-user ec2-user --sudo -i key-node1.pem -N node1

1

There are 1 best solutions below

0
On

It's telling you that you need to install libcrypt.so.

You can check with ldd $(type -p chef) which lists the shared libraries needed by chef. Since chef makes use of functions in libcrypt.so, and you don't have it installed, Chef can't work.

On Ubuntu, one would find the package to install (to obtain libcrypt.so) with:

dpkg -S libcrypt.so

but you didn't let us know which distribution you're using.

If using Linux/AWS/Redhat, try this instead:

sudo yum update
sudo yum install glibc

Now search for library

find / -name "libcrypt.so.1" 2>/dev/null

If the find command shows nothing, this means "libcrypt.so.1" is still missing. Download and install it manually by,

yum provides "*/libcrypt.so.1"
yum install "*/libcrypt.so.1"

Reference: https://unix.stackexchange.com/questions/746042/error-while-generating-cookbook-missing-shared-library-libcrypt-so-1