Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
06-30-2009, 11:26 PM
|
#1
|
Member
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114
Rep:
|
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed:
Hi,
OS=Sun 5.10 Generic_138888-08 sun4u
I have to copy some files on to an another SunOS box. To preserve the symbolic link I am using rsync.
/usr/local/bin/rsync -azuv /tmp/hi -e ssh asingh@busun067:/tmp/
With the rsync I am getting following error:
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.5]
Lib files seems to be ok.
sun063:/.ssh# which rsync
/usr/local/bin/rsync
sun063:/.ssh# ldd /usr/local/bin/rsync
libpopt.so.0 => /usr/local/lib/libpopt.so.0
libsec.so.1 => /usr/lib/libsec.so.1
libiconv.so.2 => /usr/local/lib/libiconv.so.2
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libintl.so.8 => /usr/local/lib/libintl.so.8
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libavl.so.1 => /lib/libavl.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,SPARC-Enterprise/lib/libc_psr.so.1
sun063:/.ssh#
Any idea why? and resolution?
Thanks & Regards
Anuj Singh
|
|
|
07-01-2009, 12:05 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
|
You can set the LD_LIBRARY_PATH env. variable. For bash:
Code:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
If you want this env. variable to be available for all users, you can put it in /etc/profile, using the following:
Code:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
Last edited by bathory; 07-01-2009 at 12:10 AM.
|
|
|
07-01-2009, 03:14 AM
|
#3
|
Member
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114
Original Poster
Rep:
|
rsync: fatal: libiconv.so.2: open failed:
bathory:
that seems not working either-
------------------------------------------
bash-3.00$ echo $LD_LIBRARY_PATH
bash-3.00$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
bash-3.00$ echo $LD_LIBRARY_PATH
/usr/local/lib:
bash-3.00$ rsync
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
Killed
bash-3.00$ export LD_LIBRARY_PATH=/usr/local/lib
bash-3.00$ echo $LD_LIBRARY_PATH
/usr/local/lib
bash-3.00$ rsync
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
Killed
bash-3.00$ uname -a
SunOS sun067 5.10 Generic_137111-06 sun4v sparc SUNW,T5240
bash-3.00$ ldd $(which rsync)
libpopt.so.0 => /usr/lib/libpopt.so.0
libsec.so.1 => /usr/lib/libsec.so.1
libiconv.so.2 => (file not found)
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libavl.so.1 => /lib/libavl.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,T5240/lib/libc_psr.so.1
/platform/SUNW,T5240/lib/libmd_psr.so.1
bash-3.00$
---------------------------------------------------
right now I've used tar + scp to preserve the soft links and ownership to copy. But surely I would like to know the reason of rsync problem.
Thanks & Regards
Anuj Singh
|
|
|
07-01-2009, 03:37 AM
|
#4
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,794
|
Are you logged as root when you run rsync ?
Where did you get these rsync binaries ?
They seems not to be correctly built.
|
|
|
07-01-2009, 05:53 AM
|
#5
|
Member
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114
Original Poster
Rep:
|
rsync package:
bash-3.00$ pkginfo | grep rsyn
application SMCrsync rsync
rsync we can use as a normal user too(if it's an env variable issue) right?
Thanks & Regards
Anuj Singh
|
|
|
07-01-2009, 08:08 AM
|
#6
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,794
|
Are you logged as root when you run rsync and experience the issue ?
LD_LIBRARY_PATH is a hack and doesn't apply to root in that specific case as /usr/local/lib isn't a trusted directory anyway.
Last edited by jlliagre; 07-01-2009 at 08:16 AM.
|
|
|
07-01-2009, 10:05 AM
|
#7
|
Member
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114
Original Poster
Rep:
|
jlliagre:
I tried with root as well as normal system account. same error.
sun067:/# rsync
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
Killed
sun067:/# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
sun067:/# rsync
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
Killed
sun067:/# export LD_LIBRARY_PATH=/usr/local/lib
sun067:/# rsync
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
Killed
busun067:/#
Last edited by xxx_anuj_xxx; 07-01-2009 at 10:09 AM.
Reason: added standard I/O
|
|
|
07-01-2009, 10:29 AM
|
#8
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
|
You can install the rsync package from sunfreeware (along with the dependencies you miss) and either remove SMCrsync, or use the LD_LIBRARY_PATH hack to use first the libraries in /usr/local/lib
|
|
|
07-01-2009, 11:34 AM
|
#9
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,794
|
As I already wrote, the LD_LIBRARY_PATH hack doesn't work for root.
You might use instead:
Code:
crle -u -l /usr/local/lib -s /usr/local/lib
Beware that a mistake made using the crle command migth make your system unusable.
Please read carefully the crle manual page before using it, especially the part explaining how to revert to a working system after setting a bogus library path:
Code:
LD_NOCONFIG=yes rm /var/ld/ld.config
Edit:
Hmm: it looks like the LD_NOCONFIG feature is only in Solaris Express based releases ...
Last edited by jlliagre; 07-01-2009 at 11:39 AM.
|
|
|
07-03-2009, 10:54 PM
|
#10
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
if you dont mind lib trusted or not , add all lib in your system with crle
Code:
crle -l /lib:/usr/lib:/usr/local/lib:/usr/sfw/lib:/usr/openwin/lib/
or any lib u may know. this work for me on sparc
|
|
|
07-16-2009, 06:43 AM
|
#11
|
LQ Newbie
Registered: Jul 2009
Posts: 8
Rep:
|
I have the same problem and need to solve it rather urgently.
I removed the older SMCrsync, then installed prerequisite packages and the latest rsync-3.0.6 as a package.
I used LD_LIBRARY_PATH with and without ld.config created with crle, all to no avail.
By setting LD_DEBUG I can see that the linker does find the libiconv.so.2 when invoking rsync, but still rsync fails with ld.so.1 fatal error complaining about no such file libiconv.so.2:
16877: BASE: file=libiconv.so.2; needed by /usr/local/bin/rsync
16877: BASE:
16877: BASE: find object=libiconv.so.2; searching
16877: BASE: search path=/usr/local/lib:/usr/local/lib/sparcv9:/lib/64:/usr/lib/64:/opt/SUNWspro/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/lib/X11:/usr/ucb/lib:/opt/SUNWconn/x25/lib:/usr/ccs/lib:/usr/sfw/lib:/opt/SUNWmlib/lib:/usr/sadm/lib:/usr/xpg4/lib:/usr/platform/sun4u/lib (LD_LIBRARY_PATH)
16877: BASE: trying path=/usr/local/lib/libiconv.so.2
16877: BASE: file=/usr/local/lib/libiconv.so.2 [ ELF ]; generating link map
16877: BASE: dynamic: 0xff18ba58 base: 0xff080000
16877: BASE: size: 0x10e000 entry: 0xff080094
16877: BASE: lmid: BASE lmco: 0xc
16877: BASE:
16877: BASE: version needed processing: file=/usr/local/bin/rsync
16877: BASE: file version
16877: BASE:
16877: BASE: file=/usr/local/bin/rsync; add binding to:
16877: BASE: file=/usr/local/lib/libiconv.so.2 [ NEEDED ]
16877: BASE:
Anyone managed to solve this problem? I'm getting pretty desperate ...
I have solaris 5.10, update 7 (May 2009)
thanks!
|
|
|
07-16-2009, 07:11 AM
|
#12
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,794
|
What says:
Code:
file /usr/local/lib/libiconv.so.2
file /usr/local/bin/rsync
By the way, this rsync binary is somewhat broken as it demands libiconv which isn't really required under Solaris.
The iconv functions are already included in Solaris libc.
|
|
|
07-16-2009, 07:26 AM
|
#13
|
LQ Newbie
Registered: Jul 2009
Posts: 8
Rep:
|
/usr/local/lib/libiconv.so.2: ELF 32-bit MSB dynamic lib SPARC Version 1,
dynamically linked, not stripped, no debugging information available
/usr/local/bin/rsync: ELF 32-bit MSB executable SPARC Version 1,
dynamically linked, not stripped
Could the problem be a bogus error message from rsync?
I am running it over ssh, the error might come from ssh dependencies?
|
|
|
07-16-2009, 09:20 AM
|
#14
|
LQ Newbie
Registered: Jul 2009
Posts: 8
Rep:
|
additional information: when I run
Code:
ssh remoteuser@remotehost -i /path/to/my/dsa-key /bin/true > test.dat
then I am getting an empty file, so I assume my shell is clean, even though actually logging in with ssh does generate many echo messages on the remote machine.
For the actual rsync command I have used 2 approaches:
Code:
rsync -avz -e "ssh -i /path/to/my/dsa-key" remoteuser@remotehost:/remote/dir /this/dir/
and
Code:
rsync --compress --rsh=/usr/local/bin/ssh --recursive --times --perms --links remoteuser@remotehost:/remote/dir /this/dir/
both are failing...
|
|
|
07-16-2009, 10:11 AM
|
#15
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,794
|
Quote:
Originally Posted by roger_v
additional information: when I run
Code:
ssh remoteuser@remotehost -i /path/to/my/dsa-key /bin/true > test.dat
then I am getting an empty file, so I assume my shell is clean
|
I assume the test.dat file is local so you aren't really testing the whole chain. A failed command would also produce an empty file. Better to run something like:
Code:
ssh -i /path/to/my/dsa-key remoteuser@remotehost hostname > test.dat
and see if the remote hostname shows up in test.dat.
About the main rsync issue, it is quite possible rsync has its dependencies fixed on the local side but not on the other one. The LD_LIBRARY_PATH hack is not an option for the remote command, unless you wrap rsync with a custom script. You really should check you set crle correctly.
|
|
|
All times are GMT -5. The time now is 01:12 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|