Lokesh Purohit
Lokesh Purohit

Reputation: 533

Getting error bz2 module requires libbz2 >= 1.0.0 while compiling php 8.1.13

I am trying to compile PHP with

./configure <other options> --with-bz2=/path_to_bzip2/bzip2/1.0.6

But when the build reaches bz2 it gives out below error

..
checking for BZip2 support... yes
checking for BZ2_bzerror in -lbz2... no
configure: error: bz2 module requires libbz2 >= 1.0.0

./configure for php version 8.1.13 in php-8.1.13 did not succeed

I have exported path to bzip2 in LD_LIBRARY_PATH. Also content of lib in bzip2

user@server [bzip2/1.0.6/lib]:ls
libbz2.a  libbz2.so.1.0  libbz2.so.1.0.6

Not sure why this error. I found at some forums that manually installing bzip2-devel before building PHP should resolve this. But that did not help

I tried with older version of PHP that earlier worked with same build script but those also getting into this error now. Not sure what has changed recently.

Upvotes: 1

Views: 986

Answers (1)

Lokesh Purohit
Lokesh Purohit

Reputation: 533

This was finally resolved. And it was not related to bzip2. So for anyone facing similar issues here's the summary: In config.log error was

/usr/bin/ld: cannot find -lsqlite3

So, using answers from here https://stackoverflow.com/a/21647591/10091382

I tried to find if its able to find sqlite properly Command used:

ld -lsqlite --verbose

The list displayed confirmed that its not getting the required .so files in the path its looking. So, placing the right files or pointing to right path would resolve this issue.

Upvotes: 1

Related Questions