Installing Apache Portable Runtime Utility (apr-util) Library on Ubuntu Linux

This short tutorial shows you how to install Apache Portable Runtime Utility (apr-util) Library on Ubuntu Linux Server. The process is very simple. For this tutorial, I'll be installing apr-util version 0.9.13. Linux kernel is 2.6.15-26-powerpc. I have used a Mac Mini (powerpc/ppc architecture). GCC version number is 4.0.3. Your configuration may be different from mine but the installation steps below should work fine for most configurations with little or no change at all (including other Linux distributions and even unixes e.g. MacOS X).

Apache Portable Runtime and Apache Portable Runtime Utility Project:

According to apr.apache.org,

"The mission of the Apache Portable Runtime (APR) project is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementations. The primary goal is to provide an API to which software developers may code and be assured of predictable if not identical behaviour regardless of the platform on which their software is built, relieving them of the need to code special-case conditions to work around or take advantage of platform-specific deficiencies or features."

Before starting, please check to see if there is a more up-to-date version available to download. Visit http://apr.apache.org/ to find out about the available versions. IMPORTANT: See "Configuring Ubuntu Linux After Installation" to install the development tools required to compile and install apr-util from source code. Also, see Installing Apache Portable Runtime (apr) Library on Ubuntu Linux and Installing Oracle Berkeley DB on Ubuntu Linux to install apr and Berkeley DB before you install apr-util. Please note that installation of Berkeley DB is not mandatory for apr-util.

Steps to download, compile, and install are as follows. Note: Replace 0.9.13 with your version number:

  • Downloading apr-util:

    Run the command below,

    wget http://apache.sunsite.ualberta.ca/apr/apr-util-0.9.13.tar.gz

    Also, download the MD5 hash to verify the integrity of the downloaded file. In the same folder, where you downloaded the file, do the following:

    wget http://www.apache.org/dist/apr/apr-util-0.9.13.tar.gz.md5
    md5sum apr-util-0.9.13.tar.gz
    cat apr-util-0.9.13.tar.gz.md5

    The last two commands (above) generate two strings of alpha-numeric characters. Check to see if both strings are identical or not. If not, repeat the steps above from "Downloading apr-util". If yes, your file has been downloaded properly.

    Please note that if you are using apr-util for a highly secure/critical setup (or for any other reason) (recommended) then you should also check the PGP signatures (not covered in this tutorial for simplicity).
  • Extracting files from the downloaded package:

    tar -xvzf apr-util-0.9.13.tar.gz

    Now, enter the directory where the package is extracted.

    cd apr-util-0.9.13

  • Configuring apr-util Library:

    With Berkeley DB,

    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ --with-dbm=db43 --with-berkeley-db

    Without Berkeley DB,

    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/

    Replace "/usr/local/apr-util" above with the directory path where you want to copy the files and folders. Note: check for any error message.
  • Compiling apr-util:

    make

    Note: check for any error message.

  • Installing apr-util:

    As root (for privileges on destination directory), run the following.

    With sudo,

    sudo make install

    Without sudo,

    make install

    Note: check for any error messages.

That’s it. Library has bee successfully installed.

Did this tutorial help a little? How about buy me a cup of coffee?

Buy me a coffee at ko-fi.com

Please feel free to use the comments form below if you have any questions or need more explanation on anything. I recommend thoroughy testing on a production-like test system first before moving to production.