apxs2 not found or not a directory

662 Views Asked by At

I'm trying to compile PHP 5 in ubuntu server, it's a larger explanation the why I need a compilated version and just download and install. So, the thing is that in the process I get this error:

Can't exec "a2enmod": No such file or directory at /usr/bin/apxs2 line 578.
'a2enmod php5' failed

So , I went to that directory and there's a file called apxs2 so whats wrong?

1

There are 1 best solutions below

1
On

Try to make:

cd /usr/bin
sudo ln -s /path/to/binary binary-name

in your case binary-name is a2enmod, to determine your path try to run:

locate a2enmod

This file should be in /usr/sbin directory