sftp error ld.so.1: sftp: fatal: libgcc_s.so.1: open failed: No such file or directory

Tuesday, December 21, 2010 at 12:08 AM
sftp Error message

#sftp
ld.so.1: sftp: fatal: libgcc_s.so.1: open failed: No such file or directory
Killed
#

ldd utility lists the dynamic dependencies of executable files

#ldd /local/opt/SSH/product/4.3p2/sbin/sshd
libpam.so.1 => /usr/lib/libpam.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libcrypto.so.0.9.8 => /usr/local/lib/libcrypto.so.0.9.8
librt.so.1 => /usr/lib/librt.so.1
libz.so => /usr/lib/libz.so
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libcmd.so.1 => /usr/lib/libcmd.so.1
libgcc_s.so.1 => (file not found)
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libscf.so.1 => /usr/lib/libscf.so.1
libdoor.so.1 => /usr/lib/libdoor.so.1
libuutil.so.1 => /usr/lib/libuutil.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libm.so.2 => /usr/lib/libm.so.2
/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-880/lib/libmd5_psr.so.1
#

symbolic link (/usr/local/lib/libgcc_s.so.1) is missing and not pointing to source
path /local/opt/SSH/product/4.3p2/lib/libgcc_s.so.1.


#ls -l /usr/local/lib/libgcc_s.so.1
usr/local/lib/libgcc_s.so.1: No such file or directory
#

Create symbolic link

#ln -s /local/opt/SSH/product/4.3p2/lib/libgcc_s.so.1 /usr/local/lib/libgcc_s.so.1


# ls -l /usr/local/lib/libgcc_s.so.1
lrwxrwxrwx 1 root root 46 Dec 21 08:40 /usr/local/lib/libgcc_s.so.1 -> /local/opt/SSH/product/4.3p2/lib/libgcc_s.so.1
#

Verify the dynamic dependencies of executable files

#ldd /local/opt/SSH/product/4.3p2/sbin/sshd
libpam.so.1 => /usr/lib/libpam.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libcrypto.so.0.9.8 => /usr/local/lib/libcrypto.so.0.9.8
librt.so.1 => /usr/lib/librt.so.1
libz.so => /usr/lib/libz.so
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libcmd.so.1 => /usr/lib/libcmd.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libscf.so.1 => /usr/lib/libscf.so.1
libdoor.so.1 => /usr/lib/libdoor.so.1
libuutil.so.1 => /usr/lib/libuutil.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libm.so.2 => /usr/lib/libm.so.2
/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-880/lib/libmd5_psr.so.1
/#

#sftp
usage: sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config]
[-o ssh_option] [-P sftp_server_path] [-R num_requests]
[-S program] [-s subsystem | sftp_server] host
sftp [[user@]host[:file [file]]]
sftp [[user@]host[:dir[/]]]
sftp -b batchfile [user@]host
#

#sftp node2
Connecting to node2...
exec: /usr/local/bin/ssh: No such file or directory
Connection closed
#

#ls -l /usr/local/bin/ssh
/usr/local/bin/ssh: No such file or directory
#

checked the location of the ssh binary

#which scp ssh
/local/opt/SSH/product/4.3p2/bin/scp
/usr/local/bin/ssh
#

The easy workaround is to make /usr/local/bin/ssh a valid path. created symbolic link (/usr/local/bin/ssh) pointing to the source path.

#ln -s /local/opt/SSH/product/4.3p2/bin/ssh /usr/local/bin/ssh

#ls -la /usr/local/bin/ssh
lrwxrwxrwx 1 root root 36 Dec 21 08:40 /usr/local/bin/ssh -> /local/opt/SSH/product/4.3p2/bin/ssh
#

#sftp node2
Connecting to node1...
The authenticity of host 'node1 (192.168.1.3)' can't be established.
RSA key fingerprint is 6a:51:92:3a:4e:07:8d:dc:01:e8:63:10:e5:45:46:a5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2,192.168.1.3' (RSA) to the list of known hosts.
root@node1's password:
sftp>

0 comments

Post a Comment

Solaris | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com