configure: error: Please reinstall the BZip2 distribution

Fix the "configure: error: Please reinstall the BZip2 distribution" error in PHP. Find out which packages to install on Debian, Ubuntu, CentOS and Fedora!

While compiling PHP, we may run into several errors, mainly resulting from missing developer libraries; here's one of them:

configure: error: Please reinstall the BZip2 distribution.

To eliminate the above error, we install the following package:

  • Debian / Ubuntu : install libbz2-dev (32/64 bit)
  • RedHat / CentOS / Fedora : yum install bzip2-devel.x86_64 (64 bit) / yum install bzip2-devel (32 bit)