Server Fault is a question and answer site for system and network administrators. 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'm trying to make an RPM with PHP 5.3.1 and PHP-FPM 0.6 for CentOS 5.4. So far it goes quite well, but when rpmbuild gets to the installation phase it fails with the following error:

Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.63379
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD/php-5.3.1/fpm-build/
+ make install
Installing PHP SAPI module:       fpm
Installing PHP CLI binary:        /usr/bin/
cp: cannot create regular file `/usr/bin/#INST@12668#': Permission denied
make: *** [install-cli] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.63379 (%install)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.63379 (%install)

I am running rpmbuild as a normal user, so it's understandable that it will fail to install anything into /usr/bin, but it shouldn't try to install anything outside the buildroot in the first place. I have however specified the BuildRoot in the header of the spec file and I can see it is passed correctly to the make install command.

Does anyone have some idea of what is going wrong here?

Thanks a lot!

share|improve this question

I've found the solution to the problem.

Adding INSTALL_ROOT=$RPM_BUILD_ROOT to the make install command solves it.

share|improve this answer

I found some RPMs at the following location. Both PHP 5.2 and 5.3.

I didn't have any problems downloading the src.rpms and recompiling for Fedora 10.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.