configure: error: Please reinstall the BZip2 distribution
Asked Answered
U

3

7

I am trying to compile php from source on mac with the bzip2 extension and I keep getting an error saying

checking for BZip2 in default path... not found

I've tried setting the LDFLAGS and CPPFLAGS but that doesn't seem to work.

The dylib is in /usr/local/opt/bzip2/lib and the header files are in usr/local/opt/bzip2/include.

Urien answered 24/1, 2020 at 5:55 Comment(0)
K
6

Install dependencies for php

sudo apt-get install -y libbz2-dev sqlite3 libsqlite3-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libonig-dev libreadline-dev libtidy-dev libxslt-dev libzip-dev
Kappenne answered 12/3, 2022 at 8:37 Comment(1)
This question asked only about BZip2 module, other modules are unnecessary and unrelated to the topic of the question, in my opinion.Bonnice
W
5

I had the exact same issue. I resolved it by installing bzip2 by using brew.

brew install bzip2

Wharfinger answered 17/2, 2020 at 15:22 Comment(0)
F
5

This also works:

sudo apt-get install libbz2-dev
Feodora answered 5/3, 2022 at 16:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.