After Oracle 11g very good experience with installing on Ubuntu I had high hopes for 12C also. They crumbled down quite fast. This is the summary of almost 2 days lost trying to install oracle on Ubuntu with the ups and downs.

Conclusion

First the conclusion: my personal conclusion is that oracle 12c does not work, with an acceptable amount of effort, on Ubuntu 14.04. It should be possible to install it following a guide but it’s by no means comparable to an 11g install. Most of the errors are in the linking phase where you have to manually edit the makefiles to add various missing (not found in current config) libraries. Finally I managed to install oracle 12C using a docker container using this guide but this is also not without problems.

Directly on ubuntu

After trying for some time to install on my ubuntu desktop directly I quickly realized I will sooner or later destroy my install by tinkering with ldd paths and libraries. If you are brave, and have a lot of time, you can probably follow the guide I referenced above with contained most of the problems I also encountered. The others are deductible.

In docker, using oracle linux

Installing oracle 12C in an oracle linux docker container seemed a nice idea however I quickly had docker problems:

1. The .deb archives do not seem to provide proper upstart integration and I have the following error:

# service docker start
start: Unknown job: docker

the solution is to run docker directly:

docker -d -D

2. and 3. The step1 does work since aufs conflicts with systemd from oracle linux. The solution is to use the devicemapper backend. This provides a default 10G space which is not easy to resize. There is an option but this only applies before the image is pulled from the repository. These problems are described also here if you are smart enough (not me) to look.

The solution is to start docker, BEFORE PULLING THE IMAGE FROM THE REPOSITORY as:

docker -d -D --storage-driver=devicemapper --storage-opt dm.basesize=30G

This will use the devicemapper and set a 30G image basesize.

However even if this allows the step1 to complete the install will not work! It will report a success but if you look in the logs you will encounter an error:

INFO: /usr/bin/ld: cannot find -ljavavm12
INFO: collect2: ld returned 1 exit status
INFO: make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/oracle] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'irman ioracle' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2015-05-01_10-45-50AM.log' for details.
Exception Severity: 1

When the database creation (step2.3) /tmp/create script is then run an error occurs:

ORA-12547: TNS:lost contact

After some debuging I found out this occurs at the command:

connect / as sysdba

and did not found a solution for it.

In docker, using CentOS 6.6

Since I had spent so much time trying to make the github project to work I decided to make some changes. I first changed to centos 6.6 then added some packages (tigervnc-server and xterm) in order to run the installer visually, in vnc, after step1. I still get the error from above but since I have a “retry” option which is not available in silent mode I can fix the problem:

cp /u01/app/oracle/product/12.1.0/dbhome_1/javavm/jdk/jdk6/lib/libjavavm12.a /u01/app/oracle/product/12.1.0/dbhome_1/lib/

After this the install of the database works fine, including the linking part.

Secondly the dmca also fails with a perl error but upon investigation I found that this is a core dumped !!

/u01/app/oracle/product/12.1.0/dbhome_1/perl/bin/perl
Segmentation fault (core dumped)

The solution I used was to remove and use default perl

cd /u01/app/oracle/product/12.1.0/dbhome_1/perl/bin/
mv perl perl.bak
ln -s /usr/bin/perl

and retry the install which now worked ok. Success :(