Apache httpd.h file missing on MacOSX after Mavericks Upgrade (** Updated for Yosemite **)

♀尐吖头ヾ 提交于 2019-12-03 09:40:56

问题


I am trying to run the passenger-install-apache2-module command and I keep getting this error:

ext/apache2/mod_passenger.c:25:10: fatal error: 'httpd.h' file not found

Not sure what happened to it, my local dev environment was fine until I upgraded to Mavericks - I had to update XCode and uninstall/reinstall the passenger gem.

I tried creating httpd.h in the /etc/apache2 directory and pasting this in but that didn't work.

I've no idea how to replace this file


回答1:


I was having the same error. You need to:

  1. Update/install xcode.
  2. run xcode-select --install from the command line to reinstall the command line tools.

It worked for me, hopefully for you too!

The update also commented out the line:

Include /private/etc/apache2/extra/httpd-vhosts.conf

So once I uncommented that it all loaded as normal.

** UPDATE FOR YOSEMITE **

In your /etc/apache2/httpd.conf file you'll need to change:

<Directory /> AllowOverride none Require all denied </Directory>

To:

<Directory /> AllowOverride none Require all granted </Directory>




回答2:


During the mavericks upgrade several configuration files were saved as previous and replaced by the install including:

/etc/apache2/httpd.conf~previous
/etc/group~previous
/etc/php.ini.default-5.2-previous
/etc/sshd_config~previous
/etc/syslog.conf~previous



回答3:


Another, related issue, is to do with /usr/share/httpd/build/config_vars.mk you can see that cc is set incorrectly, and CC should read CC = /usr/bin/cc, likewise CPP should read CC = /usr/bin/cc -E



来源:https://stackoverflow.com/questions/19543094/apache-httpd-h-file-missing-on-macosx-after-mavericks-upgrade-updated-for-yo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!