How to Install Oracle 11gR2 XE on Ubuntu

I wanted to import a datapump dumpfile to my laptop, and I wondered if I can install Oracle XE to ubuntu guest. I thought it would be easy because I installed Oracle 10g XE to ubuntu for several times, but I saw that Oracle doesn’t provide debian packages for Oracle 11g XE. So I needed to convert the RPM to debian package (and fix incompatibility problems). Therefor, I installed “alien” package and other required tools using apt-get:

Then I downloaded the zipped RPM (, unzipped it:

I converted the RPM to debian package (it took about 6 minutes on my VM) and then installed the package (which I created in previous step):

As you can see, the installation script tried to use “/sbin/chkconfig” but it couldn’t find it. On the other hand, there was not any big problems occurred, so I decided to continue with configuration:

Although I just entered default values, the configuration script failed. On line 15, I see that it tries to use /bin/awk – ubuntu’s awk is located at /usr/bin/awk. On line 24, it tries to create a listener “lock” file in “/var/lock/subsys/” and when I check the directories, I see that there’s no subsys folder under the “/var/lock”. So I create symbolic link for awk and create that “subsys” folder:

Then I examine the logs in “/u01/app/oracle/product/11.2.0/xe/config/log”, I see that database couldn’t be created, and the reason seems “ORA-00841: MEMORY_TARGET not supported on this system”. It typically occurs when “/dev/shm” was not sized correctly on Linux. On Ubuntu, the /dev/shm is just a symbolic link which points to /run/shm. So I removed the link, recreated the directory and mount 1 GB RAM to it:

After setting the /dev/shm, I tried again to configure the Oracle XE and it worked! Then I switched to oracle user, and connected to Oracle XE database:

I wanted to share how I fixed the problems when I encounter installing Oracle XE on Ubuntu, so I just created an empty Ubuntu guess, and re-apply all commands to make sure that I don’t miss anything. Guess what! Somehow it didn’t worked. I can surely swear that I exactly did the same things then I remembered that I installed extra packages for different purposes and some of them must be used by Oracle XE.

I checked the library usage of oracle executable and see that “” is missing. So I also installed “libaio1” package:

It solved the problem but I needed to start from scratch (purged the package and then re-install, re-configure) and everything seems OK for now. If you reboot your VM, you’ll see that /dev/shm will be reverted to symbolic link and the subsys folder is gone. It might be possible to modify Ubuntu’s configuration scripts to prevent this behaviour. On the other hand I recommend you to create a simple bash script to mount /dev/shm and startup oracle-xe, instead of modifying Ubuntu’s configuration files. For example:

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.


  1. Martin

    Hi, really nice post, which version of Ubuntu were you using in this experience?

    • Gokhan Atil

      Hi Martin,

      I couldn’t be sure about the version but it should be Ubuntu 15.10 Desktop edition.

  2. hani

    I can’t run sqlplus , like the last step
    and i can’t do this command:
    oracle@gokhan-VirtualBox:~$ . oraenv

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.