Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 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?

share|improve this question

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.

share|improve this answer

Your Answer

 
discard

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.