Install Oracle Database 10g Express Edition & Oracle PRO*C On Linux Mint 17

  3 months ago

This is a tutorial that documents my successful installation
of Oracle Database 10g Express Edition & Oracle PRO*C on my
Linux Mint 32 bit computer using Linux Mint Version 17 .
This tutorial updates a previous tutorial using Linux Mint Version 14 .

Oracle offers a newer edition of Oracle express - Oracle Database Express Edition 11g Release 2 .

But this version only works for 32 bit Windows machines
and 64 bit Linux machines. So, this tutorial can be
useful for those Linux/Linux Mint users who are operating
on a 32 bit machine.

This Oracle Database 10g Express Edition & Oracle PRO*C install used the below Linux Mint version:

anthony@an1:~ $ cat /etc/lsb-release
DISTRIB_DESCRIPTION="Linux Mint 17.1 Rebecca"

anthony@an1:~ $ uname -a
Linux an1 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:30:01 UTC 2014 i686 i686 i686 GNU/Linux

To install Oracle Database 10g Express Edition,
I used as a guide  .

Per the suggestion in the above guide, I added

   "deb unstable main non-free"
       ("https", not "http")

to my "/etc/apt/sources.list" file .

I did not add

   "deb-src unstable main"

to my "/etc/apt/sources.list" file .

After installing Oracle, I then accessed the
Database Home Page by going to
as suggested in the Oracle install guide.
I logged onto the database as administrator,
and unlocked the "HR" user, giving this user
a "HR" password.

To perform the PRO*C install, I used as a guide

"Getting Started with Oracle Pro*C on Linux (Instant Client Zip Files)"

by Mark Williams

I downloaded the "Instant Client" packages, version, from these links.

# Instant Client Package - Basic Lite
# Instant Client Package - SDK
# Instant Client Package - SQL*Plus

# Instant Client Package - Precompiler

anthony@an1:~/oracle $ ls *.zip

Use "unzip" to unzip ".zip" files.
Unzipping will install the files in an "instantclient_12_1"
directory as suggested in the article.

Created "oic12.env" file and executed it to enable
Oracle paths in my shell, as suggested in the article.
("oic12.env" for version 12 of the packages)

anthony@an1:~/oracle $ . ./oic12.env

To test the Oracle "Instant Client" package
installation, I modified the suggested command
line to successfully connect to SqlPlus
(using the "HR" user previously unlocked).


anthony@an1:~/oracle $ sqlplus hr/hr@an1:1521/XE

SQL*Plus: Release Production on Sun Mar 22 22:03:27 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Express Edition Release - Production

SQL> select user from dual;


SQL> quit
Disconnected from Oracle Database 10g Express Edition Release - Production


To compile and build the sample PRO*C file "proctest.pc",
I created a "PRO*C_Example" directory that contains
the sample code and "make" files.

1) Modified "proctest.pc" source code to refer to my login.

-- /* strncpy((char *) database.arr, "oel02:1521/XE", NAME_LEN); */
-- strncpy((char *) database.arr, "an1:1521/XE", NAME_LEN);

2) Copied a sample makefile from the downloaded PRO*C sample directory.
-- cp $ORACLE_HOME/sdk/demo/ .

3) Modified "":
   # InstantClient Directories.

    "ICSDKHOME" and "ICLIBHOME" definitions


4) Modified "instantclient_12_1/precomp/admin/pcscfg.cfg":
-- Added sys_include=/usr/include/i386-linux-gnu .
     (path from my personal Linux Mint installation)
   Used Linux command
     dpkg-architecture -qDEB_HOST_MULTIARCH
   to obtain correct include path.

5) Added


   to beginning of "pcscfg.cfg" per suggestion from

   to prevent "stdarg.h", "stddef.h" compilation errors.

   Thus, my "pcscfg.cfg" looks like this:


6) Added "#define size_t long" to the beginning of "proctest.pc"
   to prevent core dumps during compilation.

7) Modified "sql_error" in "proctest.pc" to
   eliminate a compiler warning message.

-- /* printf("%.*s", msg_len, err_msg); */
-- printf("%.*s", (int) msg_len, err_msg);

I defined a "make" command as suggested in the article.

make -f build PROCFLAGS="common_parser=yes" EXE=proctest OBJS="proctest.o"


Executing "make" and "proctest" on my Linux computer, displaying output.

anthony@an1:~/oracle/PRO*C_Example $ make -f build PROCFLAGS="common_parser=yes" EXE=proctest OBJS="proctest.o"
rm -rf SunWS_cachea
rm -rf /home/anthony/oracle/PRO*C/instantclient_12_1/
rm -rf /home/anthony/oracle/PRO*C/instantclient_12_1/
make -f PROCFLAGS="common_parser=yes" PCCSRC=proctest I_SYM=include= pc1
make[1]: Entering directory `/home/anthony/oracle/PRO*C_Example'
/home/anthony/oracle/PRO*C/instantclient_12_1/sdk/proc common_parser=yes iname=proctest include=. sys_include=\(/home/anthony/oracle/PRO*C/instantclient_12_1/sdk/include,/usr/include,/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include,/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include,/usr/lib/gcc/x86_64-redhat-linux/4.4.4/include,/usr/lib64/gcc/x86_64-suse-linux/4.1.2/include,/usr/lib64/gcc/x86_64-suse-linux/4.3/include\)

Pro*C/C++: Release - Production on Mon Mar 23 01:19:56 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

System default option values taken from: /home/anthony/oracle/PRO*C/instantclient_12_1/precomp/admin/pcscfg.cfg

make[1]: Leaving directory `/home/anthony/oracle/PRO*C_Example'
/usr/bin/gcc -m32   -O2  -fPIC -DPRECOMP -I/home/anthony/oracle/PRO*C/instantclient_12_1/sdk/include -DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS   -c proctest.c
ln /home/anthony/oracle/PRO*C/instantclient_12_1/ /home/anthony/oracle/PRO*C/instantclient_12_1/
ln /home/anthony/oracle/PRO*C/instantclient_12_1/ /home/anthony/oracle/PRO*C/instantclient_12_1/
/usr/bin/gcc -m32  -o proctest proctest.o -g -L/home/anthony/oracle/PRO*C/instantclient_12_1/ -lclntsh -ldl -lm  -lpthread
rm -rf /home/anthony/oracle/PRO*C/instantclient_12_1/
rm -rf /home/anthony/oracle/PRO*C/instantclient_12_1/

anthony@an1:~/oracle/PRO*C_Example $ ./proctest
10, Jennifer Whalen, 4400, 1
20, Michael Hartstein, 13000, 1
20, Pat Fay, 6000, 2
30, Den Raphaely, 11000, 1
30, Alexander Khoo, 3100, 2
30, Shelli Baida, 2900, 3
40, Susan Mavris, 6500, 1
50, Adam Fripp, 8200, 1
50, Matthew Weiss, 8000, 2
50, Payam Kaufling, 7900, 3
60, Alexander Hunold, 9000, 1
60, Bruce Ernst, 6000, 2
60, David Austin, 4800, 3
70, Hermann Baer, 10000, 1
80, John Russell, 14000, 1
80, Karen Partners, 13500, 2
80, Alberto Errazuriz, 12000, 3
90, Steven King, 24000, 1
90, Neena Kochhar, 17000, 2
90, Lex De Haan, 17000, 3
100, Nancy Greenberg, 12000, 1
100, Daniel Faviet, 9000, 2
100, John Chen, 8200, 3
110, Shelley Higgins, 12000, 1
110, William Gietz, 8300, 2

Hammer459 6 years ago

Not so big considering most is ripped directly from Oracle

lib2know 6 years ago

big peace of work