Monday 10 December 2012

libc.so.1: version `SUNW_1.22.7' not found (Fixed)

    I faced this problem when I'm installing rsync on  Oracle Solaris 10 9/10 s10x_u9wos_14a X86. Even installed the all of the dependencies packages of rsync, errors is still there. And I tried to get solution from some of the forum but they said this is the major Bug and all are advised to patching or upgrade to Oracle Solaris 10 8/11 s10x_u10wos_17b X86. This error made me sick a few days :)
    But Finally I fixed the problem without patching and upgrading.

Solution :
    Don't install the "rsync-3.0.9-sol10-x86-local.gz" and Download the " rsync-3.0.9.tar.gz" and compile the package yourself then install it.

Here is the step by step how I fixed the problem >>>>

Requirements Packages.

rsync-3.0.9.tar.gz
popt-1.16-sol10-x86-local.gz
libiconv-1.14-sol10-x86-local.gz
libintl-3.4.0-sol10-x86-local.gz
libgcc-3.3-sol10-intel-local.gz
gcc-3.3.2-sol10-intel-local.gz
make-3.82-sol10-x86-local.gz

All of the packages can be download at www.sunfreeware.com

Installations Dependencies
popt-1.16-sol10-x86-local.gz

#gunzip popt-1.16-sol10-x86-local.gz
#pkgadd -G -d popt-1.16-sol10-x86-local
-------------------
libiconv-1.14-sol10-x86-local.gz

#gunzip libiconv-1.14-sol10-x86-local.gz
#pkgadd -G -d libiconv-1.14-sol10-x86-local
-------------------
libintl-3.4.0-sol10-x86-local.gz

#gunzip libintl-3.4.0-sol10-x86-local.gz
#pkgadd -G -d libintl-3.4.0-sol10-x86-local
-------------------
libgcc-3.3-sol10-intel-local.gz

#gunzip libgcc-3.3-sol10-intel-local.gz
#pkgadd -G -d libgcc-3.3-sol10-intel-local
-------------------
gcc-3.3.2-sol10-intel-local.gz

#gunzip gcc-3.3.2-sol10-intel-local.gz
#pkgadd -G -d gcc-3.3.2-sol10-intel-local
-------------------

After Installation, Check Library path

#ldd /usr/local/bin/gcc
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2

#which gcc
no gcc in /usr/sbin /usr/bin   <<<------If Not Found

If not found, Add below two line in the /etc/profile with editing command "#gedit /etc/profile" or "vi /etc/profile"
PATH="$PATH:$HOME/bin:/usr/sbin:/usr/bin:/usr/local/bin:/lib/amd64:/lib:/usr/local/lib:"
export PATH

Recheck Library gcc

# which gcc
/usr/local/bin/gcc

Installation Make and Rsync

make-3.82-sol10-x86-local.gz

#gunzip make-3.82-sol10-x86-local.gz
#pkgadd -G -d make-3.82-sol10-x86-local
-------------------

#gunzip rsync-3.0.9.tar.gz
#tar xvf rsync-3.0.9.tar
#cd rsync-3.0.9.tar
#./configure
#make <<<<---------------- If Face with error check with exception step
#make install

Exception Step

Go to under below folder and execute mkheaders
#cd /usr/local/lib/gcc-lib(or)gcc/i386-pc-solaris2.10/3.3.2/install-tools
Execute the "mkheaders" file
#./mkheaders

Go back to under rsync folder and follow below step
#make clean
#./configure
#make
#make install

Checking installation of Rsync

# which rsync
/usr/local/bin/rsync

#rsync -v
rsync  version 3.0.9  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.

# rsync -v <<<---------- If Face with error, follow step
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
Killed

Check libiconv.so.2 path and copy into /lib folder

# pkgchk -LP libiconv |grep libiconv.so.2
/usr/local/lib/libiconv.so=libiconv.so.2.5.1 s none SMCliconv
/usr/local/lib/libiconv.so.2=libiconv.so.2.5.1 s none SMCliconv
/usr/local/lib/libiconv.so.2.5.1 f none 0755 bin bin 981967 8854 1334657763 SMClico

Copy the /usr/local/lib/libicopvs /usr/lib/libc.so.1nv.so.2 file under /lib folder

# cp /usr/local/lib/libiconv.so.2 /lib

Now you can successfully installed the rsync and ready to use !!!

You can check "SUNW_1.22.7" is still missing but now rsync is working well.. :)

#  pvs /usr/lib/libc.so.1
        libc.so.1;
        SUNW_1.23;
        SUNW_1.22.6;
        SUNW_1.22.5;
        SUNW_1.22.4;

So If you get this error when you are installing the other packages on Oracle Solaris 10 9/10 s10x_u9wos_14a X86, you should compile the package by yourself and install it. And don't forget to install the other dependencies packages. For me, "wget" installation also fixed with manually compiling.

Have a Nice Day .. :)

>>

UTEE