3

In the source directory:

./configure --prefix=/home/ashkan/Development/php/bin/php-5.2  --with-mysql --with-apxs2=/usr/bin/apxs2

make works fine but make install says:

Installing PHP SAPI module:       apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' libphp5.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install cp libphp5.la /usr/lib/apache2/modules/
libtool: install: cp .libs/libphp5.so /usr/lib/apache2/modules/libphp5.so
cp: cannot create regular file `/usr/lib/apache2/modules/libphp5.so': Permission denied
apxs:Error: Command failed with rc=65536

UPDATE: reading man apxs2 it seems apxs compiles and then installs the module into apache module directory. This module directory seems to be fixed!

2 Answers 2

1

Based on this blog article, if you specify INSTALL_ROOT the PHP apache module will try to install in that directory.

INSTALL_ROOT=/the/dir/path/to/install/in make install     

The other thing you might want to try adding this option to your ./configure of php-src:

--libexecdir=DIR        program executables [EPREFIX/libexec]
--sysconfdir=DIR        read-only single-machine data [PREFIX/etc]

as I believe those are being used in the Makefile

0
0

No permission to copy binaries to /usr. Do sudo make install.

3
  • Tnx for your reply but as mentioned in the question, the problem is that --prefix is used with ./configure and the libtools is supposed to copy the module in the proper location and not the /usr/lib/apache2/module Mar 3, 2013 at 9:59
  • Try putting --prefix in "" --prefix="/home/ashkan/Development/php/bin/php-5.2"
    – j0h
    Jan 20, 2014 at 15:53
  • You could try tooling with the config file. I looked briefly. its not fixed "phplibdir" is it's assignment. you could try adding set -vx into the configure script to see what it is doing with your prefix directive.
    – j0h
    Jan 20, 2014 at 16:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .