login community faq

I am trying to install mod_evasive on webfaction and i get an error permission denied because it is trying to install in usr/lib folder. I have tried to install it in webapps/{appname}/apache2/modules through

1
apxs -c mod_evasive20.c --libexecdir="/home/madawar/webapps/qlipper/apache2/modules" --prefix="/home/madawar/webapps/qlipper/apache2/lib"

But it is not working how would i compile an apache module in a local directory with apxs?

asked Sep 08 '12 at 17:32

MadawarDawar's gravatar image

MadawarDawar
1


The '--libexecdir' and '--prefix=' flags will set this for most modules. There are instances which this is not the case, such as poorly written install code or the installation of a module which assumes you have root access.

We would need to be able to see the complete error being generated and possibly the install script it is fetching itself.

answered Sep 08 '12 at 17:57

johns's gravatar image

johns ♦♦
345427

Command:

1
apxs -cia mod_evasive20.c --libexecdir="/home/madawar/webapps/qlipper/apache2/modules" --prefix="/home/madawar/webapps/qlipper/apache2/lib"

Produces

1
2
3
4
5
6
7
/var/www/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/include/httpd  -I/usr/include/httpd   -I/usr/include/httpd   -c -o mod_evasive20.lo mod_evasive20.c && touch mod_evasive20.slo
/var/www/build/libtool --silent --mode=link gcc -o mod_evasive20.la  -rpath /usr/lib/httpd/modules -module -avoid-version    mod_evasive20.lo --libexecdir=/home/madawar/webapps/qlipper/apache2/modules --prefix=/home/madawar/webapps/qlipper/apache2/lib
/var/www/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' mod_evasive20.la /usr/lib/httpd/modules
/var/www/build/libtool --mode=install cp mod_evasive20.la /usr/lib/httpd/modules/
cp .libs/mod_evasive20.so /usr/lib/httpd/modules/mod_evasive20.so
cp: cannot create regular file `/usr/lib/httpd/modules/mod_evasive20.so': Permission denied
apxs:Error: Command failed with rc=65536
(Sep 08 '12 at 18:19) MadawarDawar MadawarDawar's gravatar image

try setting the CPPFLAGS, LDFLAGS, and LD_LIBRARY_PATH flags in the documentation here.

(Sep 08 '12 at 19:41) johns ♦♦ johns's gravatar image

Try only compiling the module and not automatically install the module. Then manually copy the module to the modules directory. You should just need to remove the 'i' from the options.

(Sep 08 '12 at 23:13) bmeyer71 ♦♦ bmeyer71's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited