Compiling RLWRAP for Oracle Linux 6.1 x86-64

RLWrap is a great too to enhance the user experience with SQL*Plus by allowing it to make use of the GNU readline library. Search the Internet for RLWrap and sqlplus and you should get plenty of hits explaining how awesome that combination is.

Why am I writing this? I am currently in the process of upgrading my lab reference database server to Oracle Linux 6.1, and in the process I wanted to install the rlwrap tool to get read line support with SQLPlus. It’s actually quite simple, all I did after installing the operating system with the “database server” package is described in the few steps that follow this introduction.

First of all I was surprised that gcc wasn’t installed with the package group, and some other bits were missing too. This can easily be rectified by allowing access to the Oracle Public YUM server. I’m behind a gateway so have to use a proxy server:

[root@rhel61ref rlwrap-0.37]# export http_proxy=http://192.168.xx.10:3128
[root@rhel61ref rlwrap-0.37]# export https_proxy=https://192.168.xx.10:3128

This is a very basic SQUID setup without authentication. It’s also behind a firewall and cannot be accessed from the outside world.

Now with this set, go to /etc/yum.repos.d/ and use wget to get the repository configuration:

[root@rhel61ref rlwrap-0.37]# wget

This file needs to be edited-set “enabled” to 1 for the repository called [ol6_u1_base]. A quick “yum update” as root updates the repository information. I needed the following packages (including dependencies) to be installed as well:

[root@rhel61ref rlwrap-0.37]# yum install gcc
 [root@rhel61ref rlwrap-0.37]# yum install readline-devel

Now it’s time to get RLWrap itself, at the time of this writing it was version 0.37:

[root@rhel61ref rlwrap-0.37]# wget

I downloaded it to my home directory. There was a small problem related to the configure process:

[root@rhel61ref rlwrap-0.37]# ./configure
 checking build system type... Invalid configuration `x86_64-unknown-linux-': machine `x86_64-unknown-linux' not recognized
 configure: error: /bin/sh tools/config.sub x86_64-unknown-linux- failed
 [root@rhel61ref rlwrap-0.37]#

To work around this, you can use the “–build” flag:

[root@rhel61ref rlwrap-0.37]# ./configure --build=x86_64

This did the trick. After the configure command completed, all I needed to do was to “make” the application and “make install”. Now all I need to do is wait for Oracle to release hopefully around OpenWorld and install it to my system. Until then I’ll have to work on understanding upstart…


The alternative is to grab a RPM from a compatible source, such as EPEL (, but that depends if you are willing to mix RPMs from different sources which may not be possible due to political reasons.


5 thoughts on “Compiling RLWRAP for Oracle Linux 6.1 x86-64

  1. Mladen Gogala

    Martin, upstart is a very poorly documented Ubuntu thingy which should have never made its way into the server room. It can be used with the classic Red Hat commands like chkconfig and service, which makes it almost as user-friendly as the classic SYSV init.
    Mladen Gogala

  2. Pingback: Log Buffer #236, A Carnival of the Vanities for DBAs | The Pythian Blog

  3. Jay Weinshenker

    Hi Martin,

    Like the blog and really enjoyed your recent posts on collectl – I also learned about it from Kevin Closson’s blog. Anyhow, thanks for the post on RLWrap, but one thing you wrote has me confused – you said you’re in the process of upgrading you reference database server to Oracle Linux 6.1 – I just checked and unless I’m misreading certify (not completely unlikely…) RHEL/OL 6.X is still not certified / supported by Oracle for Oracle RDBMS – sure it’ll work with a few tweaks, but my question is, why for your reference server are you going to an unsupported OS ?

    1. Martin Bach Post author

      Hi Jay,

      You are right, Oracle Linux isn’t yet certified. I think it might be around open world when comes out, hopefully with support for OL6. I am not keen to run Oracle on OL 6.1 right now but want to be ready. Plenty of things in OL6 are new and I also would like to understand them.


  4. Pingback: How to use vi-style editing in SQL*Plus « Martins Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s