I have a Centos 7 machine.

I decided to install apache, mysql, and php from source.

I already installed (from source) the apache & mysql packages (requirements: with apr (source), apr-util (source), pcre-devel (yum installed), perl (yum installed)).

Now, I am trying to install php and the configuration file stops at extensions section of install and says:

configure: error: DBA: Could not find necessary header file(s)

1) what should I do to repair it?

I saw on the internet that I can fix it with db4-devel, the problem is that there's no db4-devel in CentOS 7.

2) Is there any replacement package for this?

3) how can I make php(7.0.3) install all extensions in ./configure?


Your internet search was correct. The above error is cause by a missing dependency: Berkeley DB development files.

The correct CentOS 7 package is libdb-devel, so installing that will let you continue until the next missing dependency.

"All extensions" is a bit too arbitrary to give an exact answer, but at this stage all errors are likely missing dependencies, so just find and install them one by one until it works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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