### Note, that for performance reasons temporary environment files used during installation procedure itself
### are created without using setenv(a|p) aliases.
+# 0. add /usr/lib or /usr/lib64 dir to the LD_LIBRARY_PATH
+if test `uname -m` = "x86_64" ; then
+echo 'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}' >> ${install_work}/$SHRC 2>/dev/null
+echo '' >> ${install_work}/$SHRC 2>/dev/null
+else
+echo 'export LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH}' >> ${install_work}/$SHRC 2>/dev/null
+echo '' >> ${install_work}/$SHRC 2>/dev/null
+fi
+
# 1. first dump all environment files into the $SHRC file
product_sequence="$2"
for i in $product_sequence ; do
# Setting "/usr/X11R6/lib" path in LD_LIBRARY_PATH for the libGL.so.1 file
if test `uname -m` = "x86_64" ; then
echo '# Setting /usr/X11R6/lib64 path in LD_LIBRARY_PATH for the libGL.so.1 file' >> ${INSTALL_WORK}/_tmp2
-echo 'export LD_LIBRARY_PATH=/usr/X11R6/lib64:/usr/lib64:${LD_LIBRARY_PATH}' >> ${INSTALL_WORK}/_tmp2
+echo 'export LD_LIBRARY_PATH=/usr/X11R6/lib64:${LD_LIBRARY_PATH}' >> ${INSTALL_WORK}/_tmp2
else
echo '# Setting /usr/X11R6/lib path in LD_LIBRARY_PATH for the libGL.so.1 file' >> ${INSTALL_WORK}/_tmp2
echo 'export LD_LIBRARY_PATH=/usr/X11R6/lib:${LD_LIBRARY_PATH}' >> ${INSTALL_WORK}/_tmp2