This is probably too easy a fix to even blog about, but, hey. I was installing mod_rails for the first (second?) time, and got this message when I ran passenger-install-apache2-module:
* Apache 2... not found
* Apache 2 development headers... not found
I had Apache installed in /usr/local/apache2 and /usr/local/apache2/bin wasn't on the PATH, so passenger's PlatformInfo.find_httpd method couldn't find it. A quick PATH=$PATH:/usr/local/apache2/bin/ && export PATH, rerun passenger-install-apache2-module, and all was well.
5/14/2008 update: If you do this you'll probably also want to add that directory to your PATH setting in /etc/profile; otherwise you'll get similar error messages when you run passenger-memory-stats.
Thanks, i ran into this today when trying to install mod rails on apache2 on centos install (with apache 1 already installed).
Your solution worked a charm.
Posted by: a_c_m | August 10, 2008 at 08:04 AM
Is apache2 the same thing as httpdv2? My web server is Apache/2.2.3, but I don't have anything called apache2.
Any recommendations?
Thanks.
Posted by: Kam | November 12, 2008 at 12:46 PM
@kam, yup, that's right, "apache2" is just the directory that I installed Apache 2.2.10 in.
Posted by: tomcopeland | November 12, 2008 at 01:47 PM
I think I have httpd in PATH (/usr/sbin), but passenger-install-apache2-module reports "* Apache 2... not found"
Is there something I'm missing? I'm running on Fedora (if that matters).
Thanks,
Kam
# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/apache-maven/bin:/root/bin:/usr/sbin:/etc/httpd:/usr/lib:/usr/include
# whereis httpd
httpd: /usr/sbin/httpd.worker /usr/sbin/httpd /etc/httpd /usr/lib/httpd /usr/include/httpd /usr/share/man/man8/httpd.8.gz
Posted by: Kam | November 13, 2008 at 11:54 AM
@kam, hm, do you have the httpd-devel package installed?
Posted by: tomcopeland | November 13, 2008 at 03:11 PM
Yes, a yum install httpd-devel yields
Package httpd-devel - 2.2.3-11.el5_2.4.i386 is already installed.
Package httpd-devel - 2.2.3-11.el5_2.4.x86_64 is already installed.
passenger-install-apache2-module also confirms: "Apache 2 development headers... found"
Posted by: Kam | November 13, 2008 at 06:52 PM
@kam, hm, so it's finding the headers but not Apache itself... what does "rpm -q httpd" give you? Maybe it's finding the 32 bit headers but only the 64 bit Apache is installed...
Posted by: tomcopeland | November 14, 2008 at 09:06 AM
Thanks ! I was searching for this :)
Posted by: Yohann | April 02, 2009 at 04:25 PM