Bearded Magnum

Oracle-xe on Ubuntu

one comment

My purpose is not to write another installation guide for Oracle Express Edition on Ubuntu (Feisty). This is very well documented and quite easy.

However, despite a fresh installation, you will get the following error when loading /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh :

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh:114:[[:not found
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh:114:[[:not found

You're not to be blamed, there is a slight error in the script.
The solution is to simply edit it (as root) and remove a pair of square brackets on lines #108 and #110.

if [ -n "$LC_ALL" ]; then
  locale=$LC_ALL
elif [ -n "$LANG" ]; then
  locale=$LANG
else
  locale=
fi

An alternative solution is to change the shell declaration on the very first line of the script.

Now, after reexecuting oracle_env.sh, the variable NLS_LANG should be set.

> echo $NLS_LANG
> AMERICAN_AMERICA.AL32UTF8

The explanation of this issue is that the Bourne Shell does not support the [[ compound command while the Bash shell does.

Written by Alexis

September 15th, 2007 at 2:59 am

Posted in Uncategorized