Installing TOra with Oracle Support on Ubuntu 10.04 (Lucid Lynx)

Posted in: Technical Track

Once again into the breach. The release of Ubuntu 10.04 is at hand. I’ve been playing with “Lucid” for a couple of months now but since we’re in beta2 with the release candidate soon to follow, I thought I would really sit down and get my normal app stack working including TOra. All in all the instructions are mostly the same as last time around, with a couple of new improvements, caveats and quid pro quo.


This one is being written using the 32 bit version of everything. I tend to use my laptop as a testbed and I have not upgraded any 64 bit machines as of yet. The instructions will be the same, you just need to make some environmental changes to get it working with 64 bit systems. I’ll try to update the blog when I do it myself next month, or check my previous guides and extrapolate as necessary.

Get the packages

First off we’ll create new directories for the packages and get the sources. Ubuntu 10.04 is using TOra 2.1.1. If you want the full list of changes in this version then you are out of luck, you can check the NEWS file on the TOra svn site which states only “lots of notes missing for 2.x series”.

mkdir -p /path/to/deb/source/
cd /path/to/deb/source/
apt-get source tora

Now get the Oracle packages. Get them from the Oracle site. Since there’s a new version of the oracle client I am using the lastest and greatest.

  • oracle-instantclient11.2-basiclite-
  • oracle-instantclient11.2-devel-
  • oracle-instantclient11.2-sqlplus-

Install the prerequisites and development libraries

Next we’ll want to install the build dependencies via apt. To do this, run the following simple command.

sudo apt-get build-dep tora

Now we’ll get all the other build tools and libraries that we’ll need for this to work. This list is exactly the same as last time.

sudo apt-get install libqt3-mt-dev libqt3-compat-headers libqscintilla-dev build-essential g++ gcc autoconf automake flex zlib1g-dev docbook-xsl debhelper alien libaio1 dpatch fakeroot xsltproc texi2html texinfo libqt3-mt-psql libqt3-mt-odbc config-package-dev cmake qt4-dev-tools

Next install the Oracle clients. In the directory where you downloaded them run the following to convert and install the packages in one fell swoop.

cd /path/to/oracle/rpms
sudo alien -i *386.rpm

Environment Variables

Now that we have all the bits we need, we set up the build environment. First we set up the oracle home environment and library path.

export ORACLE_HOME="/usr/lib/oracle/11.2/client"

As before you’ll want to add these into your system wide profile or .bashrc in order to use TOra. Just to change things up a bit, this time around we’ll add it to the default profile. Oddly this was not working for me directly with sudo, so you will need to get a root shell going to make it happen.

sudo -s
[sudo] password for $you:
echo export ORACLE_HOME="/usr/lib/oracle/11.2/client" >> /etc/profile
echo export LD_LIBRARY_PATH="${ORACLE_HOME}/lib" >> /etc/profile
echo export TNS_ADMIN="${ORACLE_HOME}" >> /etc/profile

And now we have a new player. The last time around I had you create a symlink to the includes for oracle, this time It’s much easier to just use the CMAKE environment variables to point to the include files we need.

export CMAKE_INCLUDE_PATH=/usr/include/oracle/11.2/client

Now on to the main event.

Building and installing TOra

Go to your build directory and you’ll see there is a tora-2.1.1 directory. Change to this directory.

cd /path/to/tora/tora-2.1.1/

Run the script to build the package.

fakeroot debian/rules binary

Depending on your system speed, take a break while the compile runs. Once done, proceed to install it like so.

dpkg -i ../tora_2.1.1-1_i386.deb

The Update Issue

This time around I am going to break out the method of stopping updates to a few methods.

  • Method 1: Using dpkgSupports: apt-get, SynapticThis is the way I have been doing it through all the blogs in this series. The problem I found with this method is that some GUI package managers do not seem to respect the hold the way I think they should. So I can hold it all I want, but the second I let KPackageKit do an upgrade I am sunk. It also will not survive a dist-upgrade, not even using apt.

    Luckily for me I almost always do it on the command line using apt, so for those inclined as I am you simply need to run this command.

    echo "tora hold" | sudo dpkg --set-selections

    To ensure the change took, look at the package status like so. The response from dpkg is bolded.

    $ dpkg-query --status tora|grep Status
    Status: hold ok installed

    When you are done you should see this if you try to run an upgrade via apt.

    $ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages have been kept back:

    If it does not hold the package back, then check your status as above.

  • Method 2: Using aptitudeSupports: aptitude, KPackageKitThis method is similar to the above, but has the annoying habit of removing packages when you do it. Sure it’s only removing packages that you no longer need (considered unused by aptitude like old kernels). I personally like to control when packages are removed and adding a hold to a package is not the right time to uninstall things.

    If, after all that, you still want to try it then here is the command you need.

    sudo aptitude hold tora

    I did some searching and I see no method to display this hold status using aptitude. If someone can add a method for this in comments it would be helpful.

  • Method 3: Using $GUI front endI know there are quite a number of different package managers out there and most probably support methods 1 and/or 2. If not then you’ll need to figure that one our on your own. Feel free to add the package manager and method in comments.
  • Method 4: Super Guerilla Tactics(tm)Supports: EverythingThis method is easy but is not really for the faint of heart. It has the advantage of never having to worry about upgrades again, at least until a much newer version comes out. This method involves changing the package version number before compiling to create a package with a version number that should be higher than anything available in the repository. This needs to be done before you compile, or you can go back and compile it again.

    First, add an entry to the debian changelog file.

    cd /path/to/tora/tora-2.1.1
    vi debian/changelog

    You can see that this file has a series of change log entries with dates and version numbers. Add a new entry to the top of the file as I did with the below example. Be cautious of the spacing and blank lines between entries as the compiler will barf if they are even one space off. Pay particular attention to the 2 spaces between the email address and the date which cannot be replicated on a web page correctly due to html parsing (multiple spaces are not allowed, not even after proper punctuation :O)

    tora (2.1.1-10) unstable; urgency=low

    * Version incremented to avoid upgrades.

    — Brad Hudson <> Thu, 15 Apr 2010 14:00:00 +0500

    tora (2.1.1-1) unstable; urgency=low

    * New upstream version.

    — Michael Meskes <> Thu, 19 Nov 2009 15:18:19 +0100

    Save and exit the file. As you can see, all I did was change the packaged version to -10, which is higher than -1 through -9, meaning there would have to be 9 more official releases before it’ll overwrite your custom package. I did not update the actual code version (everything before the -) so if a version 2.1.2-1 comes out you’ll need to watch for it. These number can be changed to anything you want however (as long as it’s higher), so if you wanted to make sure it was never upgraded even for major version changes, you could set the version to this.

    tora (5.1.1-1) unstable; urgency=low

    The program code will not change through any of this, just the package name.

    Now that you’ve modified the changelog, go back to the build step and recompile everything. When you are done the build can install the shiny new version like so.

    sudo dpkg -i ../tora_2.1.1-10_i386.deb

End Game Re-Redux

Don’t forget your tnsnames.ora. We set up the environment to use TNS_ADMIN=/usr/lib/oracle/11.2/client which means that tora will look for tnsnames.ora there. The easiest way I found was to get the production tnsnames.ora file from the Oracle server itself, and place it in the $TNS_ADMIN directory. Once you have done so, start TOra and enjoy. Remember to start it from the xterm session that has the environment variables set if you have not yet logged out/in.

Once again the build was pretty smooth. I have replicated these instructions 3 times over the course of writing this so there should be very few problems for you if you follow step by step.

As I stated before I could write these up for other distros if anyone is interested. Leave comments if you are.


The TOra homepage
Installing TOra with Oracle support on Ubuntu 8.04LTS (Hardy Heron)
Installing TOra with Oracle support on Ubuntu 9.04 (Jaunty Jackalope)
Installing TOra with Oracle Support on Ubuntu 9.10 (Karmic Koala)
Kubuntu linux

Interested in working with Brad? Schedule a tech call.

About the Author

Brad is just a guy, you know? I fought my way up in the world tooth-and-nail. Starting in broadcasting and music to travel to computer support to development of mid size xBase programs. Finally I settled into the wonderful world of system administration where I have honed my skills doing many diverse tasks. I started using Solaris in the mid 80's and built my first Linux system on a 386 using 30-some floppy disks and never looked back.

37 Comments. Leave new

Blogrotate #23: The Weekly Roundup of News for System Administrators | The Pythian Blog
April 16, 2010 1:39 pm

[…] promised I’ve posted the instructions for Installing TOra with Oracle Support on Ubuntu 10.04 (Lucid Lynx). Be sure to check it out. And don’t forget to upgrade your […]

Log Buffer #185, a Carnival of the Vanities for DBAs | The Pythian Blog
April 16, 2010 2:47 pm

[…] own Brad Hudson posts instructions on how to install TOra, the graphical Oracle client, on the latest Ubuntu release (Lucid […]


I had to do the following extra bit to get TOra to build from the SVN version available on Sourceforge:
export ORACLE_PATH_INCLUDES=”/usr/include/oracle/11.2/client”


Sorry, ignore the last comment, not quite true.

Had to read the 9.10 guide to get the SVN version from Sourceforge installed, and do the following so the installer could find oci.h in $ORACLE_HOME/include:

sudo ln -s /usr/include/oracle/11.2/client64/ ${ORACLE_HOME}/include

Brad Hudson
May 4, 2010 2:23 pm


I am not really surprised. The blog was all based around the packaged version in the Ubuntu repositories. If you want to create a deb from the svn version then you can download the source with apt, then copy the patch file over to your svn source. Run the patch like patch -p0 and it should create the /debian directory with the build scripts to debianize the whole thing. You may need to change the patch parameters to get it to work, I am going from the top of my head here. You’ll also want to change the version info in the /debian/changelog file to make sure it versions your package correctly.




Brad – I don’t think you need to patch Tora itself to get it working from the Sourceforge repository (which fixes some of the *many* crashes the packaged version has!). I’ve built it and got it running on my 64-bit machine with the Oracle 11.2 client by 1) setting all of these environment variables, 2) creating a symbolic link for some of these *.h files, and 3) installing cmake 2.8.1 from to avoid a policy error when configuring.

Much more work, especially since the SVN version is often broken and simply doesn’t install properly on Debian systems, but worth it when it does run.

Giles Paterson
May 10, 2010 4:49 am

Thanks for your guides, they’ve been really useful for me each time I come to do an upgrade.

However, this time I had a couple of issues relating to the environment variables.

According to the wiki ( /etc/environment should be used instead of /etc/profile as that file isn’t always read in.

Also, and more importantly, you can’t set LD_LIBRARY_PATH globally anymore, you need to use the /etc/*.conf files instead as LD_LIBRARY_PATH gets unset on startup for security reasons.

I created a file called /etc/ and that just contains the line /usr/lib/oracle/11.2/client/lib This way you don’t need to worry about setting the LD_LIBRARY_PATH at all.

See this bug for more info:

David Carson
May 12, 2010 1:26 pm

Is there any way I can verify that the image I have built supports Oracle, short of running tora and seeing the Oracle connection providers? I am asking, of course, because when I run tora, I only get MySQL in the connection provider dropdown.

Strange. I did this whole exercise last night on my Lucid install at home. First time, same thing happened. I looked back through the instructions and noticed that I had not set the CMAKE_INCLUDE_PATH variable…maybe something didn’t build quite right. So I blew away my source and rebuilt it. Second time seemed to go as the first, but I had the two Oracle options in the dropdown once I started tora.

So, now I’m at work and I followed the instructions more strictly. No go. I have tried setting LD_LIBRARY_PATH via /etc/ (as suggested in comments above) and in the environment. I have made sure the other two env. vars are set. Don’t know what else to try.


David Carson
May 12, 2010 2:48 pm

Never mind — user error.

I put the env. vars in /etc/environment, as per the comment from Giles. But instead of also setting them in the shell I was about to build with, I ‘sourced’ the /etc/environment file. Of course, it is not a set of ‘export’ commands, but rather simple assignments, so my shell did not pick up the values.

I have rebuilt and all is well now. Thanks.


For future reference, yes you can tell if Oracle support is added before building & installing, just look at the first few lines when its configuring:

— Guessed ORACLE_OCI_VERSION value: 11G for 112
— Found Oracle: (ORACLE_HOME=’/usr/lib/oracle/11.2/client64′)
— includes: /usr/lib/oracle/11.2/client64/include
— Found XML Oracle:
— Oracle not found.
— Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/
— currently found includes: /usr/lib/oracle/11.2/client64/include
— Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/
— currently found libs:
— No Oracle OCI found. TOra will be build without Oracle support


How To Install Ailurus On Fedora…

I found your entry interesting thus I’ve added a Trackback to it on my weblog :)…


I am trying to get TOra to build with Oracle, but I don’t want to use the instant client. I need the full client for integrating R, so I am sandboxing in a VM before I try this on my machine. I successfully installed the Oracle client (11.2.0) and R seems to be playing nicely with it. Now I’d like to get TOra to install and integrate with the full client. However, I get the following error when I try to compile:

dpkg-shlibdeps: error: no dependency information found for /u01/app/oracle/product/11.2.0/client_1/lib/ (used by debian/tora/usr/bin/tora).
dh_shlibdeps: dpkg-shlibdeps -Tdebian/tora.substvars debian/tora/usr/bin/tora returned exit code 2
make: *** [binary-predeb-IMPL/tora] Error 9

I found someone having a similar problem on Karmic, but didn’t see any response:

I did

export CMAKE_INCLUDE_PATH=/u01/app/oracle/product/11.2.0/client_1/rdbms/public

which is the location for oci.h, but I saw no difference in the output from

fakeroot debian/rules binary

(at least at the end–didn’t see the beginning because it went right out of my scrollback). If I had nothing in CMAKE_INCLUDE_PATH I got the same result, I didn’t see anything complaining about oci.h.

Any clue what I need to do to get TOra to use the full client?

Ryan Novosielski
June 30, 2010 12:03 pm

The proper way to deal with the changelog file is not editing it by hand, but by using debchange/dch to change the file. Its man page is pretty descriptive.


hi, thank you for the guide. i followed it and all steps goes on, but at the end in Tora I haven’t the possibility to select an oracle connection. i can’t know why


Thanx a lot! Great guide

Dominique Hausser
July 29, 2010 1:58 am


Excellent guide. Deb package generated without any error message.

I had to use :

export CMAKE_INCLUDE_PATH=/usr/include/oracle/11.2/client64

variables are the following:

*The problem is that I get the message error ORA-12154 (*

Connection via sqlplus64 is ok and the different config files are the same I used with Tora 1.23 under 9.04 and 9.10.

Any idea as I am not a computer scientist, I strictly do not know where I should look.

Have a nice day


When I try to connect to the database by tora:

Unable to connect to the database.
ORA-12737: Instant Client Light: unsupported server character set WE8ISO8859P15.

How to solve that?



Matafe have a look at this explanation of the error code.

There would be two choices here. 1) Change the Oracle config to use a supported character set or 2) try compiling using the full client, not the light client.

I have not tested option 2 as I do not need it, but if you get it to work please post your results. The process should be the same with the exception of the client package you install.



I chose the option 2. The process was the same like you said.

My steps:

sudo apt-get remove tora
sudo apt-get remove oracle-instantclient11.2-basiclite
Download the file ‘oracle-instantclient11.2-basic-’ from the oracle site
sudo alien -i oracle-instantclient11.2-basic-
I did a message error with alien “error: incorrect format: unknown tag”. But it seems everything ok.

cd /path/to/tora/tora-2.1.1/
fakeroot debian/rules binary
sudo dpkg -i ../tora_2.1.1-1_i386.deb

Now it’s ok. Tora working with character set WE8ISO8859P15!

I decide to write a post on my blog in Portugues:


Instalando TORA con soporte oracle Ubuntu 10.04 Lucid Lynx « LinuxGros’s Weblog
September 13, 2010 10:07 am

[…] es practicamente una traducción del articulo en ingles de Installing TOra with Oracle Support Ubuntu 10.04(Lucid Lynx) de […]


Hello, this was so helpfull that I made a spanish traduction of this post, hoping not bother you. If you’re dislike my action please let me know and I’ll eliminate the post I made in my blog


i posted this on the 9.10 tutorial!

is it possible to run pl/sql queries on tora using mysql database?

i’m getting this error: The tool PL/SQL Editor doesn’t support the current database

whenever i connect it using my mysql db!


Thanks for the tutorial.

Is there any similar guide for Ubuntu 10.10 ? (Maverick Meerkat)

Brad Hudson, SA Team Lead
January 5, 2011 10:36 am

ubuntero I had planned one but due to priorities I have not had time to get to it. Since you asked, I’ll see what I can do.


Funny, I just had the same request–I tried to build tora-2.1.2 with Oracle (based on this guide) after a Maverick upgrade, but it failed at:

dpkg-shlibdeps: error: no dependency information found for /u01/app/oracle/product/11.2.0/client_1/lib/ (used by debian/tora/usr/bin/tora).
dh_shlibdeps: dpkg-shlibdeps -Tdebian/tora.substvars debian/tora/usr/bin/tora returned exit code 2
make: *** [binary-predeb-IMPL/tora] Error 9

I have the full client installed, since I need it for other software, so my setup might be strange. If you have a hint what to look at based on the error I receive I’d appreciate it.


Hmm, looking back at my notes, I had the same error trying to install on Lucid with the full Oracle client installed.

I think I will set up a clean Maverick VM in VirtualBox and install the instant client only, then build tora there. That way I can install from the .deb on my main machine. I’ll let you know how it goes!


I managed to build tora-2.1.2-1ubuntu1_amd64 on a Maverick Meerkat VM, but I do not get an option for Oracle (TNS) or Oracle (Instant Client) in the Connection provider field when starting. Only MySQL shows up.

I started from the terminal, with $ORACLE_HOME, etc. exported, and with tnsnames.ora in my $TNS_ADMIN folder.

The build only threw one warning at the end, about a user-defined field ‘Original-maintainer.’

I went ahead and removed tora-2.1.2 from my main machine and re-installed the tora-2.1.1 version I built previously, and that still works fine.

I did not get new versions of the Oracle instant client (still using, so perhaps there is some problem there. I’ll check back to see if you put out a new guide for 10.10!


OK I made it work. I also figured out that the compile I was trying on my VM wasn’t finding Oracle:

— Found Oracle: /usr/lib/oracle/11.2/client64/lib/ (ORACLE_HOME=’/usr/lib/oracle/11.2/client64/’)
— Oracle not found.
— Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/
— currently found includes: ORACLE_INCLUDES-NOTFOUND
— Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/
— currently found libs: /usr/lib/oracle/11.2/client64/lib/
— No Oracle OCI found. TOra will be build without Oracle support

So instead I compiled using the full client rather than the instant client on my main machine. That means the line above:

export CMAKE_INCLUDE_PATH=/usr/include/oracle/11.2/client

has to change to something like:

export CMAKE_INCLUDE_PATH=/u01/app/oracle/product/11.2.0/client_1/rdbms/public

And the other problem I had with compiling against the full client (which I mentioned in an earlier comment), I found the solution at:

which is to add the following to /etc/dpkg/shlibs.override
libclntsh 11.1
libocci 11.1

I am now going to try to increase the version number with debchange/dch and recompile so I don’t have update issues. Thanks again–never could do this without the guides and comments I found here!

Brad Hudson, SA Team Lead
January 7, 2011 4:31 pm

I have a working version on 10.10, I did it last night (instead of sleeping). I’ll be putting up that blog in the next couple of days. There were a few differences to be sure.

The one issue I am still having is that the oracle environment variables are not being sourced by X so I cannot start TOra from the GUI without hacking the menu, which will not do. I hope to have that fixed by blog date so if you are testing it do your testing from the command line for now.

Brad Hudson, SA Team Lead
January 7, 2011 4:36 pm

Also I did have to revert from using the CMAKE env vars to using the symlink to $ORACLE_HOME/include. For some odd reason the CMAKE vars did not work the same as they did on 10.04. The symlink it easier anyways. :)


i can’t install instant client :(

root@uaque:/home/uaque/Downloads# alien -i oracle-instantclient11.1-basic-
Unpacking of ‘oracle-instantclient11.1-basic-’ failed at /usr/share/perl5/Alien/Package/ line 168.

168 line is: $this->do(“rpm2cpio “.$this->filename.” | (cd $workdir; $decomp cpio –extract –make-directories –no-absolute-filenames –preserve-modification-time) 2>&1″)
or die “Unpacking of ‘”.$this->filename.”‘ failed”;


hi all,

i follow the whole step in my ubuntu machine, but didnt get oracle tab in tora. i spend 4 days but i m not able to install tora with oracle.

# uname -a
Linux XXXX 2.6.32-31-generic 61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64 GNU/Linux

i download both oracleclient 11.2 and 11.1 (both 64bit) and tora (tora-2.1.3). i follow the complete steps. at the end i also got tora_2.1.2-1_amd64.deb file and tora-dbg_2.1.2-1_amd64.deb.

i install that packages. but i unable to build tora with oracle.

please any boddy help me for build it out. if any thing from my side i will going to do.

i m on the hanging position.



Hey brad,

just wanted to say thank you for the tutorial. Saved me a lot of hassle when I wanted Tora inclusive the oracle connection provider.


Thank you for your efforts and kindness in sharing these tutorials. As both a Linux and Tora newbie–they are much appreciated. Is there any chance of getting a tutorial or step-by-step for Ubuntu 10.10 64-bit? I have made slight modifications to your instructions to account for preceived differences… but to no avail. Tora compiles and runs, but without the much needed support for Oracle.


If you see “QT qmake not found”, make certain that your /usr/bin/qmake symlink is pointed at the right version of qmake

sudo update-alternatives –config qmake



About the problem “… failed at /usr/share/perl5/Alien/Package/ line 168”

I get the same error message when there is no enough free space in my disk. Alien needs more then ~300 MB free disk space to convert oracle-instantclient11.1-basic

Installing TOra with Oracle Support on Ubuntu 12.10 (Quantal Quetzal) « Gorbeia's Blog
November 14, 2012 6:58 am

[…] Installing TOra with Oracle Support on Ubuntu 10.04 (Lucid Lynx) HowToBuildToraWithOracle Atsegin dut:Atsegin dutBe the first to like […]


Leave a Reply

Your email address will not be published. Required fields are marked *