Monthly Archives: September 2012

Installing OCI8 on Ubuntu 12.04 LTS Precise (with PHP 5.2.x)

Recently I wrote about installing PHP 5.2 on Ubuntu 10.04 LTS, then again about how I also got PHP 5.2 working on Ubuntu 12.04 LTS Precise in the same way. Well now I’m trying to get OCI8 working in this environment and there were a couple of obstacles.

Firstly, an updated package somewhere along the line broke my fix to libtool.m4. So that needed fixing with:

sudo mv /usr/share/aclocal/libtool.m4 /usr/share/aclocal/libtool.m4.bak
cat /usr/share/aclocal/lt~obsolete.m4 /usr/share/aclocal/ltoptions.m4 /usr/share/aclocal/ltsugar.m4 /usr/share/aclocal/ltversion.m4 /usr/share/aclocal/libtool.m4.bak | sudo tee -a /usr/share/aclocal/libtool.m4

Then you need to follow the manual OCI8 installation method the bit your after starts: “For a manual install, download the PECL OCI8 package”.

Once you get to the following command:


It’s time to fix things up. The libtool in the package just won’t work when you go to run make. So remove it and link to your local version.

sudo rm ./libtool
sudo ln -s `which libtool` ./libtool

Now you can carry on with the instructions. You may get a few warning messages, but everything should be fine.

Hope that helps,