Drupal 6.x And Ubuntu 8.04 (Hardy)

A few weeks ago I wrote a post about how to bring a stock CentOS 5 server up to spec to run Drupal 6. It seems only fair I do the same for Debian and Ubuntu, since it seems they too are not without their little issues when a stock install. This quick post was written after configuring a server running Ubuntu 8.04.2 (or Hardy Heron, as it was codenamed).

Follow the instructions in that comment and you'll have GD the way you need it. Just in case they go an get lost, I'll double them here:

Open a command line interface & add following 2 lines to /etc/apt/sources.lst

deb http://packages.dotdeb.org stable all

deb-src http://packages.dotdeb.org stable all

then run > apt-get update

run > apt-get install php5-gd

( it will complain about non-authenticated sources .. just ignore, it will also update some additional php libs , keep local modified php.ini )

run > /etc/init.d/apache2 restart

done ... you'll enjoy this one

modified packages come from > http://www.dotdeb.org/ >

they provide upgraded packages for LAMP stacks

Djamu

Next problem is some missing PECL stuff. You get this a bit with CentOS too, in so far as while much of it is bundled, most of the PHP libraries and modules that are additional have been compiled for the "wrong" version of PHP once you've updated. But anyway, that's an aside... we're on Debian. And the main thing you'll want to install is uploadprogress. Drupal specifically asks for it (I think - or if not core, popular contrib).

I knew my PHP installs were done within /usr, so I found the PEAR .channels/

directories with

[~] $ cd /usr

[/usr] $ sudo find . -type d -name .channels

./lib/php/.channels

./share/pear/.channels

deleted them

[/usr] $ sudo find . -type d -name .channels -exec rm -rf {} \;

and then updated the channels

[/usr] $ sudo pear update-channels

Now installing extensions from PEAR and PECL is back to normal.

Following those instructions fixed it for me. Hopefully you won't have that particular problem at all. Time for the next php-pear error:

# pecl install uploadprogress

downloading uploadprogress-1.0.1.tgz ...

Starting to download uploadprogress-1.0.1.tgz (8,536 bytes)

.....done: 8,536 bytes

4 source files, building

running: phpize

sh: phpize: not found

ERROR: `phpize' failed

Doh!! Seems phpize is part of the php-dev package, which must also be installed. Now at this point I'm not too comfortable with this approach any more, because installing anything marked -dev is not generally considered to be a great idea. Lots of people do it without issue, so I forged on in the end, but it's worth noting that the other option is to find a pre-built .DEB file to install if you don't want to do all this.

So, install php-dev *and* make so php-pear has all the bits it needs to be able to build our additional packages:

apt-get install php-dev make

Now running the original PECL install command again works. That's it. We're done. Debian/Ubuntu now has the PECL and GD bits it needs to run Drupal. =)

We’re Code Enigma

We’re one of the most experienced Drupal teams in Europe, best known for our work on large, technically challenging projects for all kinds of clients.

Our team is passionate about Drupal and open source software. Our whole company spends at least four weeks per year working on Drupal modules or other open source projects. We’re also strongly committed to putting design first, taking a mobile-first, content-out approach to creating websites. This ensures that the sites we build combine the power of Drupal with best practice design and development.