5

System info

[root@xilinx busybox-1.22.1]# uname -r
2.6.32-71.el6.x86_64

Following errors come when I make busybox on rhel 6:

/usr/bin/ld: cannot find -lcrypt
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1

Also I can see the libraries are there in lib:

[root@xilinx busybox-1.22.1]# ls  -ld /lib/libcry*
-rwxr-xr-x. 1 root root 38380 Sep  7  2010 /lib/libcrypt-2.12.so
lrwxrwxrwx. 1 root root    16 Jan 25 16:48 /lib/libcrypt.so.1 -> libcrypt-2.12.so

[root@xilinx busybox-1.22.1]# ls -ld /usr/bin/ld*
-rwxr-xr-x. 1 root root  595192 May  5  2010 /usr/bin/ld
-rwxr-xr-x. 1 root root 1685416 Aug 24  2010 /usr/bin/ldb3add
-rwxr-xr-x. 1 root root 1685416 Aug 24  2010 /usr/bin/ldb3del
-rwxr-xr-x. 1 root root 1685416 Aug 24  2010 /usr/bin/ldb3edit
-rwxr-xr-x. 1 root root 1685424 Aug 24  2010 /usr/bin/ldb3modify
-rwxr-xr-x. 1 root root 1685424 Aug 24  2010 /usr/bin/ldb3rename
-rwxr-xr-x. 1 root root 1685424 Aug 24  2010 /usr/bin/ldb3search
-rwxr-xr-x. 1 root root    5656 Sep  7  2010 /usr/bin/ldd

Why this is happening ?

Additional Info:

[root@xilinx busybox-1.22.1]# yum install glibc-*
Loaded plugins: refresh-packagekit, rhnplugin
There was an error parsing the RHN proxy settings.
RHN support will be disabled.
Setting up Install Process
Package glibc-devel-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-headers-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-utils-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-common-2.12-1.7.el6.x86_64 already installed and latest version
Nothing to do

Also these are the installed packages starting with glib*

[root@xilinx busybox-1.22.1]# yum list installed |grep glibc*
There was an error parsing the RHN proxy settings.
RHN support will be disabled.
NetworkManager-glib.x86_64          1:0.8.1-5.el6                      @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
PackageKit-glib.x86_64              0.5.8-13.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
avahi-glib.x86_64                   0.6.25-8.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
dbus-glib.x86_64                    0.86-5.el6                         @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
dbus-glib-devel.x86_64              0.86-5.el6                         @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
glib.x86_64                         1:1.2.10-33.el6                    @epel    
glib-devel.x86_64                   1:1.2.10-33.el6                    @epel    
glib2.x86_64                        2.22.5-5.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
glib2-devel.x86_64                  2.22.5-5.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
glibc.i686                          2.12-1.7.el6                       @server  
glibc.x86_64                        2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
glibc-common.x86_64                 2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
glibc-devel.x86_64                  2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
glibc-headers.x86_64                2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
glibc-utils.x86_64                  2.12-1.7.el6                       @server  
glibmm24.x86_64                     2.22.1-1.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
poppler-glib.x86_64                 0.12.4-3.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
pulseaudio-libs-glib2.x86_64        0.9.21-13.el6                      @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
taglib.x86_64                       1.6.1-1.1.el6                      @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0

glibc is installed:

[root@xilinx busybox-1.22.1]# yum list installed glibc
Loaded plugins: refresh-packagekit, rhnplugin
There was an error parsing the RHN proxy settings.
RHN support will be disabled.
Installed Packages
glibc.i686                                              2.12-1.7.el6                                             @server                                                
glibc.x86_64                                            2.12-1.7.el6                                             @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0

Tried RPM

[root@xilinx Downloads]# rpm -ivh glibc-static-2.12-7.2.x86_64.rpm 
warning: glibc-static-2.12-7.2.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 2ca06d46: NOKEY
error: Failed dependencies:
    glibc-devel = 2.12-7.2 is needed by glibc-static-2.12-7.2.x86_64

Now here is a chicken and egg problem

[root@xilinx Downloads]# rpm -ivh glibc-2.12-7.2.x86_64.rpm 
warning: glibc-2.12-7.2.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 2ca06d46: NOKEY
error: Failed dependencies:
    glibc-common = 2.12-7.2 is needed by glibc-2.12-7.2.x86_64

Ok then I installed this dependency:

[root@xilinx Downloads]# rpm -ivh glibc-common-2.12-7.2.x86_64.rpm
warning: glibc-common-2.12-7.2.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 2ca06d46: NOKEY
error: Failed dependencies:
    glibc = 2.12-7.2 is needed by glibc-common-2.12-7.2.x86_64

i.e when I install glibc-2.12-7.2 , it says I need glibc-common-2.12-7.2 but now when I install glibc-common-2.12-7.2, it says it need glibc-2.12-7.2

How do break this chicken-egg cycle?

But actually all required glibc are installed

[root@xilinx busybox-1.22.1]# yum install glibc-*
     Package glibc-devel-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-headers-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-utils-2.12-1.7.el6.x86_64 already installed and latest version
Package glibc-common-2.12-1.7.el6.x86_64 already installed and latest version
Nothing to do
  • As can be seen all glibc are installed and latest versions. So why it I am getting libcrypt error? – user2799508 Apr 17 '14 at 12:10
3

Busybox uses static libraries, so you have to install glibc-static (which I think is not in the RHEL6, you'll have to find it) in order to use Busybox with librcrypt.a and not the dynamic version.

2

This helped me finally to resolve my own ld -lcrypt issues. I too validated I had all the libraries in my /usr/lib64/libcrypto.so and libcrypt.a and these were not found!! (but could see them).

ADDING to my Centos-7 system the static glibc libraries

yum install glibc-static

resolved the problem..

0

The versions don't match. You have 2.12-1.7, but it's looking for 2.12-7.2. It's subtle, but enough for rpm to freak out.

You can pass --nodeps to RPM to force the static package to install. If it doesn't work afterward, just remove the package.

  • If I am doing --nodeps , I see lots of 'conflicts'. So what packages should I remove ? – user2799508 Apr 17 '14 at 12:56
  • Shall I remove all 2.12-1.7 glibc? and then re-install 2.12-7.2 – user2799508 Apr 17 '14 at 13:03
  • If you can find the 2.12-7.2 glibc versions, sure. Otherwise, just forcing the static package to install should work. – Nathan C Apr 17 '14 at 13:25
0

This error maybe caused by the system cannot find file named libcrypt.so in your /lib directory. It only finds /lib/libcrypt-2.12.so and /lib/libcrypt.so.1.

A simple way to fix this is to make a symlink named libcrypt.so which links to libcrypt-2.12.so file in the same directory.

In my case, you can run this command:

ln -s /lib/libcrypt-2.12.so /lib/libcrypt.so

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.