Posts Tagged ‘Ubuntu’

OCIEnvNlsCreate() failed

Wanted to work on an Oracle project from home last weekend, but I received this message:

Warning (2): ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system – please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories [CORE/cake/libs/model/datasources/dbo/dbo_oracle.php, line 171]

A little bit of system background here. I’m using Linux Mint 8, running oracle-xe 10.2.0.1-1.1. oci8 was compiled via pecl, with one notable difference from my previous guide. I did not use instantclient (i.e. instantclient,/usr/lib/oracle/11.1/client/lib), so the phpinfo output for the oci8 section was quite different.

It looked like:

OCI8 Support enabled
Version 1.4.1
Revision $Revision: 293235 $
Active Persistent Connections 0
Active Connections 0
Compile-time ORACLE_HOME /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
Libraries Used -Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -lclntsh
Temporary Lob support enabled
Collections support enabled

I did some searching. I figured it was something to do with environment variables, as my colleague had helped me to resolve the problem previously. I’d forgotten the fix, so this post will serve as a reminder, if needed.

Now ORACLE_HOME and LD_LIBRARY_PATH were defined via my .bashrc, which consists of just one line:

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

$ echo $ORACLE_HOME
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
$ echo $LD_LIBRARY_PATH
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:

Some people suggested using Apache’s SetEnv — which I tried — but the error did not go away. That same colleague suggested this morning I use the envvars file in Ubuntu instead, which helped to resolve my problem, at least:

Adding these two lines solves my problem:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:

Seriously, my journey with Oracle has always been a rocky one. I wonder why this product is so… inaccessible.

Shell commands for Ubuntu Netbook Edition 9.10

As above, useful when deploying a client PC.

# installing Wine, IEs4Linux
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

# removing games
sudo apt-get remove gnome-games
sudo apt-get autoremove

# clearing command history
history -c

Debian-based distro adventures

Since my previous post, I’ve used:

I’ve compared MEPIS 8 and Ubuntu 9.04, in what was called an unfair comparison by some. I think some of the commenters even indicated that Ubuntu 9.04 would’ve come up tops, but I begged (and still do) to differ.

Since then, I’ve used Mint 7 and Kubuntu 8.04, which one may realize are using GNOME 2 and KDE 3 as well. So I guess a more appropriate comparison would’ve been:

  • MEPIS 8 versus Kubuntu 8.04;
  • Ubuntu 9.04 versus Linux Mint 7.

All of packages I use (e.g. php-pear, imagemagick, mysql-server) have the same names across the four distributions (but that’s probably due to Debian).

All four distributions work fine w/ Oracle Express Edition, which is a great way to try out Oracle database if you don’t happen to work for a large corporation that uses its (probably too-)expensive licenses.

I must say that it wasn’t so much the particular distribution, source distribution or version number that affected the speed of the interface, but rather, the window manager.

GNOME 2 just seems… slow. KDE 3 is well… snappy.

To me, there is no discernable difference between MEPIS and Kubuntu — both use KDE 3, except perhaps Kubuntu uses Adept whilst MEPIS sticks to good old Synaptic. Both are great applications nonetheless.

I’ll gripe about the loss of Dropbox, which is available both Ubuntu and Mint due to GNOME. Apparently there is command-line instructions available. But I digress.

On the upside, I can’t seem to (easily) setup a network printer in either MEPIS or Kubuntu. I followed the instructions on the Ubuntu website, and voila, I could print. Likewise for Mint, which is basically Ubuntu nicely themed. Or maybe I’m just scratching the surface.

Kdesvn and Meld are almost interchangeable, unless you want to view svn logs of course (use the former).

So there you have it. If you’ve got a high-performance, dual- (or quad-) core laptop, Ubuntu or Mint will do fine. But if you’ve got a 2- to 3- year old laptop, consider Kubuntu 8.04 or MEPIS 8. Unfortunately, I can’t access mepis.org anymore — the site is down, why? — and Canonical maintains fast servers, so I’ll be using Kubuntu for the forseeable future.

Return top