Operating System - HP-UX
1833802 Members
2130 Online
110063 Solutions
New Discussion

Re: /usr/lib/dld.sl: Can't open shared library

 
SOLVED
Go to solution
josinjosek
Advisor

/usr/lib/dld.sl: Can't open shared library

HI,

By mistake I renamed /usr/lib/libdld.2 to /usr/lib/libdld.2.old
after that server is not allowing me to login.
I have booted the server in to single user mode, most of the commands are not working ( only cd echo are working).
I am getting below error.
# ls
/usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2
/usr/lib/dld.sl: No such file or directory
Abort(coredump)
#

Please help me to resolve this issue. can I revert it back ?

7 REPLIES 7
H_16
Trusted Contributor

Re: /usr/lib/dld.sl: Can't open shared library

Boot off your .prev kernel
josinjosek
Advisor

Re: /usr/lib/dld.sl: Can't open shared library

Hi,

I booted the server with .prev kernel,its not booting giving below error.


restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.

Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.

Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).

/sbin/auto_parms: DHCP access is disabled (see /etc/auto_parms.log)

/usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2
/usr/lib/dld.sl: No such file or directory
/sbin/auto_parms[24]: 333 Abort(coredump)
/usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.

Matti_Kurkela
Honored Contributor
Solution

Re: /usr/lib/dld.sl: Can't open shared library

Don't panic.

Booting with the .prev kernel won't help, because the problem is not in the kernel.

Moving the /usr/lib/libdld.2 file away broke the dynamic loader: now any binaries that require shared libraries won't run until the problem is fixed. Only statically linked programs will run. Unfortunately, all the binaries in /usr/bin will require at least the /usr/lib/libc.2 library...

The commands in /sbin are statically linked and should work even when /usr/lib/libdld.2 does not exist.

Use this command:

# /sbin/mv /usr/lib/libdld.2.old /usr/lib/libdld.2

MK
MK
Matti_Kurkela
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library

So you already booted the server. Get back to the single user mode.

After booting to single-user mode, the root filesystem will be in read-only mode, and /usr will not be mounted. First run "mountall", then the /sbin/mv command I posted in my first reply.

MK
MK
josinjosek
Advisor

Re: /usr/lib/dld.sl: Can't open shared library

Hi MK,

It worked !!!!!

Thanks a lot for your quick response.

Regards,
Josin.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/dld.sl: Can't open shared library

>By mistake I renamed /usr/lib/libdld.2 to /usr/lib/libdld.2.old

The correct question is why?
If you are patching these, swinstall knows how to rename these and correctly move a new one n place.

You need to use atomic "ln -f":
ln -f /usr/lib/libdld.2 /usr/lib/libdld.2.old
ln -f /usr/lib/libdld.2.new /usr/lib/libdld.2

Note: Since dld and libdld have to be in sync, you really need to modify both at the same time and that may require /sbin/ln -f.
josinjosek
Advisor

Re: /usr/lib/dld.sl: Can't open shared library

Hi Dennis,

Thanks a lot for providing different approach to solve this issue.

issue is already resolved by
# /sbin/mv /usr/lib/libdld.2.old /usr/lib/libdld.2
server is working fine now.