I wanted to install the Apache-Module X-Sendfile as shown in http://elivz.com/blog/single/mod_xsendfile/ on my Mac OS X 10.9 (Mavericks) setup.
After downloading and unpacking the files, I've used the command sudo apxs -cia mod_xsendfile.c
to run the install.
After fixing the Error "Not a directory" by creating a symlink (shown in this answer), a new problem occured :
lduer:mod_xsendfile-0.12 lduer$ sudo apxs -cia mod_xsendfile.c
Password:
/usr/share/apr-1/build-1/libtool --silent --mode=compile /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include -I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_xsendfile.lo mod_xsendfile.c && touch mod_xsendfile.slo
env: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc: Not a directory
apxs:Error: Command failed with rc=65536
I haven't found any solutions by searching the web with the error code.
Edit 2013-12-13: I want to mention that the requested Path where the Error Not a directory occured (env: /Applications/[...]/bin/cc
)is a symlink, linking to the file "clang" in the same directory. Maybe this helps to answer the question.
Best Answer
Here's how I installed the module:
brew install httpd
(note: it will not remove or damage your current, Apple-provided apache install)sbin
in apache dir, i.e./usr/local/Cellar/httpd/2.2.23/sbin
Compile the module (as fat-module variant):
Restart apache.