How to find out what libraries and Linux rpm packages Oracle depends on.
Sometimes before a Linux update it is helpful to know how it may impact Oracle RDBMS.
Oracle RDBMS does not come as RPM package. It means that RPM is not aware of Oracle binaries and other files that may have dependencies on the package being updated.
Also Oracle recommends to relink RDBMS binaries after OS updates.
Should it be done after any package update? Or some certain ones?
Lets find out what OS libs Oracle RDBMS depends on.
# su - oracle
> cd $ORACLE_HOME
> find . -type f|while read F; do
FT=`file $F|grep ELF`
if [ "$FT" != "" ]; then
#echo $F
for L in `ldd $F 2>/dev/null`;do if [ -f $L ];then echo $L;fi; done
for L in `ldd -d $F 2>/dev/null`;do if [ -f $L ];then echo $L;fi; done
for L in `ldd -u $F 2>/dev/null`;do if [ -f $L ];then echo $L;fi; done
fi
done | sort -u | grep -v `pwd` >referencedLibs.txt
After a minute or two there will be all OS libraries that this Oracle Home depends on. That what I've got.
/lib64/ld64.so.1
/lib64/libcrypt.so.1
/lib64/libdl.so.2
/lib64/libgcc_s.so.1
/lib64/libnsl.so.1
/lib64/power6/libc.so.6
/lib64/power6/libm.so.6
/lib64/power6/libpthread.so.0
/lib64/power6/librt.so.1
/lib/ld.so.1
/lib/libcrypt.so.1
/lib/libdl.so.2
/lib/libexpat.so.0
/lib/libgcc_s.so.1
/lib/libnsl.so.1
/lib/libutil.so.1
/lib/power6/libc.so.6
/lib/power6/libm.so.6
/lib/power6/libpthread.so.0
/lib/power6/librt.so.1
/opt/ibmcmp/lib64/libibmc++.so.1
/usr/lib64/libaio.so.1
/usr/lib64/libICE.so.6
/usr/lib64/libSM.so.6
/usr/lib64/libstdc++.so.5
/usr/lib64/libstdc++.so.6
/usr/lib64/libX11.so.6
/usr/lib64/libXau.so.6
/usr/lib64/libXdmcp.so.6
/usr/lib64/libXt.so.6
/usr/lib/libgdbm.so.2
/usr/lib/libICE.so.6
/usr/lib/libodbcinst.so.1
/usr/lib/libSM.so.6
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++.so.6
/usr/lib/libX11.so.6
/usr/lib/libXau.so.6
/usr/lib/libXdmcp.so.6
/usr/lib/libXext.so.6
/usr/lib/libXi.so.6
/usr/lib/libXmu.so.6
/usr/lib/libXp.so.6
/usr/lib/libXt.so.6
/usr/lib/libXtst.so.6
Now we can get list of packages.
> for L in `cat referencedLibs.txt`; do rpm -qf $L --qf "%{NAME} \n"; done|sort -u
compat-libstdc++-33
expat
gdbm
glibc
libaio
libgcc
libICE
libSM
libstdc++
libX11
libXau
libXdmcp
libXext
libXi
libXmu
libXp
libXt
libXtst
unixODBC
vacpp.rte
It may be helpful to add these packages into yum.conf [main] exclude parameter to avoid updates of these packages during regular update or install sessions. Consider also to set skip_broken=1 in yum.conf [main]. Yum will skip updating packages that are dependent on the excluded packages.
You will have to comment the exclusion if you need to update these packages, and after the update you should relink Oracle RDBMS to make sure there are no errors that are not ignorable. If errors happen you have to rollback the OS updates.
Oracle RDBMS does not come as RPM package. It means that RPM is not aware of Oracle binaries and other files that may have dependencies on the package being updated.
Also Oracle recommends to relink RDBMS binaries after OS updates.
Should it be done after any package update? Or some certain ones?
Lets find out what OS libs Oracle RDBMS depends on.
# su - oracle
> cd $ORACLE_HOME
> find . -type f|while read F; do
FT=`file $F|grep ELF`
if [ "$FT" != "" ]; then
#echo $F
for L in `ldd $F 2>/dev/null`;do if [ -f $L ];then echo $L;fi; done
for L in `ldd -d $F 2>/dev/null`;do if [ -f $L ];then echo $L;fi; done
for L in `ldd -u $F 2>/dev/null`;do if [ -f $L ];then echo $L;fi; done
fi
done | sort -u | grep -v `pwd` >referencedLibs.txt
After a minute or two there will be all OS libraries that this Oracle Home depends on. That what I've got.
/lib64/ld64.so.1
/lib64/libcrypt.so.1
/lib64/libdl.so.2
/lib64/libgcc_s.so.1
/lib64/libnsl.so.1
/lib64/power6/libc.so.6
/lib64/power6/libm.so.6
/lib64/power6/libpthread.so.0
/lib64/power6/librt.so.1
/lib/ld.so.1
/lib/libcrypt.so.1
/lib/libdl.so.2
/lib/libexpat.so.0
/lib/libgcc_s.so.1
/lib/libnsl.so.1
/lib/libutil.so.1
/lib/power6/libc.so.6
/lib/power6/libm.so.6
/lib/power6/libpthread.so.0
/lib/power6/librt.so.1
/opt/ibmcmp/lib64/libibmc++.so.1
/usr/lib64/libaio.so.1
/usr/lib64/libICE.so.6
/usr/lib64/libSM.so.6
/usr/lib64/libstdc++.so.5
/usr/lib64/libstdc++.so.6
/usr/lib64/libX11.so.6
/usr/lib64/libXau.so.6
/usr/lib64/libXdmcp.so.6
/usr/lib64/libXt.so.6
/usr/lib/libgdbm.so.2
/usr/lib/libICE.so.6
/usr/lib/libodbcinst.so.1
/usr/lib/libSM.so.6
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++.so.6
/usr/lib/libX11.so.6
/usr/lib/libXau.so.6
/usr/lib/libXdmcp.so.6
/usr/lib/libXext.so.6
/usr/lib/libXi.so.6
/usr/lib/libXmu.so.6
/usr/lib/libXp.so.6
/usr/lib/libXt.so.6
/usr/lib/libXtst.so.6
Now we can get list of packages.
> for L in `cat referencedLibs.txt`; do rpm -qf $L --qf "%{NAME} \n"; done|sort -u
compat-libstdc++-33
expat
gdbm
glibc
libaio
libgcc
libICE
libSM
libstdc++
libX11
libXau
libXdmcp
libXext
libXi
libXmu
libXp
libXt
libXtst
unixODBC
vacpp.rte
It may be helpful to add these packages into yum.conf [main] exclude parameter to avoid updates of these packages during regular update or install sessions. Consider also to set skip_broken=1 in yum.conf [main]. Yum will skip updating packages that are dependent on the excluded packages.
You will have to comment the exclusion if you need to update these packages, and after the update you should relink Oracle RDBMS to make sure there are no errors that are not ignorable. If errors happen you have to rollback the OS updates.