Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install PHP 5.4.7 by following these steps:

$ apt-get install libxml2-dev
$ mkdir php5-new && cd !$
$ wget -O php-5.4.7.tar.bz2
$ bzip2 -d php-5.4.7.tar.bz2
$ tar xvf php-5.4.7.tar.gz
$ cd php-5.4.7
$ ./configure --with-mysql --with-apache2 --with-libxml --with-openssl --with-zlib --with-bz2 --with-curl --with-dom --with-gd --with-imap --with-imap-ssl --with-mcrypt --with-mysqli --with-pdo-mysql --with-libxml --enable-ftp --enable-mbstring --enable-soap

But reports the error:

configure: error: Please reinstall the BZip2 distribution

However bzip2 is already installed normally. What can it be?

share|improve this question
Did you also install its -dev package? – Michael Hampton Sep 12 '13 at 16:05

Run apt-get build-dep php5 first. This should get you all the dev libraries.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.