Fatal error: file “apr.h” was not found when installing x-sendfile mac os x mountain lion server

When I upgraded my Lion Server to Mountain Lion, it seems like it removed my mod_xsendfile from apache.

I followed the instructions on this website, but got stuck in the error "There is no such file or directory." With some google help, I found this page that gave me a solution to this: "sudo ln -s / Applications / Xcode.app / Contents / Developer / Toolchains / XcodeDefault.xctoolchain // Applications / Xcode.app / Contents / Developer / Toolchains / OSX10.8.xctoolchain "

It looked good, but when I try to run "sudo apxs -cia mod_xsendfile.c", I get the error "fatal error: apr.h" file not found ".

Any ideas?

+7
source share
1 answer

You need to reinstall the Xcode command line tools:

xcode-select --install 

Then you will most likely have to accept the Xcode license agreement again:

 sudo xcodebuild -license 

Once you do this (like your symbolic link for the tool chain), you should be good to go.

+7
source

All Articles