Phpbrew: Install php-5.4.33 with +apsx2 failed on ubuntu

Created on 17 Oct 2014  Â·  6Comments  Â·  Source: phpbrew/phpbrew

Hi,

My goal is to run a Drupal project in the same condition it will be running after a VM update.
I'm using Ubuntu 14.04, Apache 2.4.7 and the system PHP is 5.5.9.

I've launched the instal with the following phpbrew -d install 5.4 +default +mysql +apxs2

The end of the output looks like that :

===> Building...
make >> /home/jeremie/.phpbrew/build/php-5.4.33/build.log 2>&1
Build finished: 4.8 minutes.
Installing...

Install failed.

And the tail of the log file shows

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

The /usr/lib/apache2/modules/ directory is owned by root should I change that ? Or should I run the install with sudo ?

Thanks

Support

Most helpful comment

And a recap for anyone having the same issue :

sudo chmod oga+rw /usr/lib/apache2/modules
sudo chmod -R oga+rw /etc/apache2/
phpbrew -d install 5.4 +default +mysql +apxs2
sudo chmod og-w /usr/lib/apache2/modules
sudo chmod -R og-w /etc/apache2/

All 6 comments

Hi!

Please run chmod:

sudo chmod oga+rw /usr/lib/apache2/modules

And chmod it back after the installation.

That's something we'd like to improve in #339, but it's not implemented yet. for now, please chmod the directory manually.

Ok, I tried, now it fails a bit further :

mv: cannot move ‘/etc/apache2/mods-available/php5.load’ to ‘/etc/apache2/mods-available/php5.load.bak~’: Permission denied
'mv /etc/apache2/mods-available/php5.load /etc/apache2/mods-available/php5.load.bak~' failed
make: *** [install-sapi] Error 1

I'll chmod it as well and come back with the result.
Thanks for your quick reply !

No problem. glad you've found the solution. :+1:

Alright, It worked :)

Thanks for your help !

And a recap for anyone having the same issue :

sudo chmod oga+rw /usr/lib/apache2/modules
sudo chmod -R oga+rw /etc/apache2/
phpbrew -d install 5.4 +default +mysql +apxs2
sudo chmod og-w /usr/lib/apache2/modules
sudo chmod -R og-w /etc/apache2/
Was this page helpful?
0 / 5 - 0 ratings