« hotwire and hightail | Main | we are glass »

oracle 9i (9.2.0.1) on debian (unstable)

Trying to make Oracle 9i work under Debian (specifically Debian unstable) ? Me too.

  • I got it to install ok - read this to see how to fix that "Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk" error during installation.

  • When I went to run dbca, the JVM segfaulted. Ok. I editted it (it's a script), and changed JRE_DIR to point at a newer version of a JRE/JDK I had around ("and here's one I prepared earlier..."). Also, right at the very end of the file, it has 2 lines where it runs $JRE_DIR/bin/jre - I had to change these to $JRE_DIR/bin/java.

  • The next hurdle appeared when I reached the end of the dbca config process and hit "finish" to go ahead and create the database. Somewhere in here, it bombed out with an ORA-03113 "end-of-file on communication channel" error. If you poke around in the bdump (and such) directories before closing the ORA-03113 error dialog box, you'll find an alert log with this at the end :

    Errors in file /u01/app/oracle/admin/yourdb/udump/yourdb_ora_1234.trc:
    ORA-07445: exception encountered: core dump [skgmidrealm()+338] [SIGSEGV] [Address not mapped to object] [0x3320DFFC] [] []
    
  • After a fair bit of poking around on the web, I found this helpful page over in the Gentoo Linux forums, which explains that there's a bug in glibc 2.3.1, which has been fixed in 2.3.2, though you can patch the source to fix it for now. Debian unstable is currently using glibc 2.3.1, so I did an apt-get source libc6 and after poking around, discovered that I had to create a new "dpatch" file in glibc-2.3.1/debian/patches, which I called oracle-dl-runtime.dpatch :

    #! /bin/sh -e
    
    # DP: Oracle fix for dl-runtime.c, as per http://forums.gentoo.org/viewtopic.php?t=35340
    
    if [ $# -ne 2 ]; then
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
    fi
    case "$1" in
        -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
        -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
        *)
            echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
            exit 1
    esac
    exit 0
    
    --- glibc-2.3.1/elf/dl-runtime.c~       2003-05-22 13:00:29.000000000 +1000
    +++ glibc-2.3.1/elf/dl-runtime.c        2003-05-22 13:00:50.000000000 +1000
    @@ -84,7 +84,7 @@
              {
                const ElfW(Half) *vernum =
                  (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]);
    -           ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff];
    +           ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff;
                const struct r_found_version *version = &l->l_versions[ndx];
    
                if (version->hash != 0)
    @@ -179,7 +179,7 @@
                  {
                    const ElfW(Half) *vernum =
                      (const void *) D_PTR (l,l_info[VERSYMIDX (DT_VERSYM)]);
    -               ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff];
    +               ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff;
                    const struct r_found_version *version = &l->l_versions[ndx];
    
                    if (version->hash != 0)
    

    I then added oracle-dl-runtime to the end of the 0list file (also in the glibc-2.3.1/debian/patches directory). A dpkg-buildpackage later and I've got a new libc6_2.3.1-17_i386.deb package (note: it's a good idea to change the debian part of the version number when you do this. I didn't do it yet, 'cause I wanted to make sure it actually worked). After installing it, database creation completed successfully. Woo!

  • NOTE: I've been using Linux since 1992, and I still get the willies having to do stuff like patching libc. Exercise extreme caution, and beware that if you screw it up, your whole system may fall over sideways and give you the finger. Presumably glibc 2.3.2 will make it into Debian soon enough, and you won't have to worry about all this. The main reason I posted this is so it's in one place for the next poor sap trying to make it go...

* 14:12 * geek

Comments have been closed for this post. If you've got something to say, please contact me by other means. Thanks!

Comments (9)

cos:

Alex Malinovich has expanded on the above information, at http://www.the-love-shack.net/oracle-on-sid.html

cos:

Note: Debian unstable now carries licb6-2.3.2, so you shouldn't need to patch libc6 anymore. I've just installed libc6-2.3.2-2 on a test machine here, rebooted and restarted Oracle, and all seems to be well.

lala:

i'm installing oracle 9ir2 with debian sarge (and libc6 v2.3.2 from unstable).

i got the ins_ctx.mk error, but it went away simple installing libc6-dev

also i got the dbca error (jvm segfault). i read somewhere that it was due to locales ... i simple edited the dbca script and set JRE to another jre installed: JRE_DIR=/oracle/soft/app/oracle/jre/1.3.1

cos:

just having libc6-dev installed didn't make that probem go away for me (given that i compile other stuff on my machines, i have to have libc6-dev installed anyway).

and yeah, you can use Oracle's JDK 1.3 if you like - it doesn't really matter as long as it's something newer than the 1.1.8 that it tries to run by default.

struppi:

Just a short hint if somebody else encounters the same problem: If the Oracle Universal Installer refuses to start with the message

error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory

you probably have a newer version of gcc 3 installed. It helps to just install the old libstdc++ runtime by doing:

apt-get install libstdc++2.9-glibc2.1

OUI then starts.

naveed:

makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk"
This problem is accour wen i m installing oracle on red hat 9.0
i have glibc-devel-2.2.4-26.i386.rpm package
i was also edit $(LDLIBFLAG)dl this in

$ORACLE_HOME/ctx/lib/env_ctx.mk file but proplem is not solved............

dlb:

Does anybody succeed to install Oracle 9i (9.0.1) on a Debian Woody? I just can't start the install as the "runInstaller" crashes at launch... SIGSEV! As this is a Java problem, i tried with JRE 1.1.8_v3 (from blackdown.org) but it doesn't help...
any idea, help???

dsp:

In order to get rid of the SIGSEGV you need to
unset LANG
and install the locales package.
I think you will at least need the en_US locales.
Works here now without replacing the JRE which is not the same as the oracle modified JRE.

Get Oracle 9i2 to work with debian and kernel 2.6?

After quite a few problems (and days of trying!) I decided to take another route:

I installed Suse 8.0 on a small partition including development utilities.

Then I mounted the drive to install oracle on to /opt (InstDir = /opt/oracle)

I went through the installer with no probs@all.

After the installation finished I rebooted debian and mounted the installed oracle drive to /opt

After the following minor adjustments I got it to work fine:
- copy the files created in /usr/local/bin (coraenv, oraenv, dbhome) and /etc (oratab) to debian
- changed the owner of all oracle files to the debian oracle user (Suse has a weird uid for Oracle which I dislike)
- and last but not least I soft linked $ORACLE_HOME/JRE to my SUN java 1.4
- within the java dir I linked java to jre as oracle uses the latter

I must admit this is not a preferred route to take, but it works and I got oracle installed in next to no time.

have fun
Vanessa