Not finding Apache Portable Runtime (APR) with custom Apache install

5,627 views
Skip to first unread message

Johnpg

unread,
Apr 14, 2008, 1:53:58 PM4/14/08
to Phusion Passenger Discussions
I have successfully installed Passenger using the built-in Apache that
comes with Ubuntu and also Centos. However I'm having an issue on a
different set of servers that have a custom Apache2 installation.
These servers are running Ubuntu 6.10, and I don't believe (at least
at the time they were initially installed) that there was an Apache
2.2 available for it out of the box. So we compiled our own as we
needed mod_proxy_balancer for Mongrel.

After pointing APXS to the correct spot (/web/apache/bin/apxs), the
passenger-install script is complaining that it can't find the Apache
Portable Runtime (APR) development headers. However they do appear to
be there as part of custom install. It does find everything else. See
below.

* GNU C++ compiler... found at /usr/bin/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/bin/rake
* Apache 2... found at /web/apache/bin/httpd
* Apache 2 development headers... found at /web/apache/bin/apxs
* Apache Portable Runtime (APR) development headers... not found
* fastthread... found

The apr headers are in /web/apache/include. Is there a way to tell the
install script to look there? I even tried symlinking the include
directory into obvious places like /usr/include/httpd and /usr/include/
apache2 with no success. To verify, there are 61 header files in /web/
apache/include that begin with apr_*. So I'm pretty sure this is just
a case of the installer not knowing where to look.

Any help would be appreciated. It's not an emergency, but I'd love to
get this going.

Thanks!

Cheers,
John

Johnpg

unread,
Apr 15, 2008, 1:14:15 PM4/15/08
to Phusion Passenger Discussions
No love for this one? I thought it'd be easy! :-)

If (when) I figure it out I'll post the answer here in case someone
else has the same problem.

Cheers,
John

Hongli Lai

unread,
Apr 15, 2008, 3:45:43 PM4/15/08
to phusion-...@googlegroups.com

The installer autodetect APR by running the command 'apr-1-config
--cppflags --includes' or 'pkg-config --cflags apr-1', whichever is
available. apr-1-config should have been installed along with Apache.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Johnpg

unread,
Apr 16, 2008, 6:48:08 PM4/16/08
to Phusion Passenger Discussions
Fantastic! The trick was to make sure that the bin directory of my
custom Apache install was in my path before any other Apache installs.
That might be worth adding to the documentation at some point.

It's compiling now!

Thanks!

Cheers,
John

tmac

unread,
May 28, 2008, 2:46:04 PM5/28/08
to Phusion Passenger Discussions
I'm having a very similar problem.

ubuntu 6.06 LTS
apache 2.2.6 prefork source build

Same results with both the 1.05 gem and development releases.

sudo passenger-install-apache2-module .....

Checking for required software...

* GNU C++ compiler... found at /usr/bin/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/local/bin/rake
* Apache 2... not found
* Apache 2 development headers... not found
* Apache Portable Runtime (APR) development headers... found
* fastthread... found

okies...
export APXS2=/usr/local/apache2/bin/apxs

try again... seems to find all the requirements this time

sudo passenger-install-apache2-module ....

Checking for required software...

* GNU C++ compiler... found at /usr/bin/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/local/bin/rake
* Apache 2... found at /usr/local/apache2/bin/httpd
* Apache 2 development headers... found at /usr/local/apache2/bin/
apxs
* Apache Portable Runtime (APR) development headers... found
* fastthread... found
--------------------------------------------

--------------------------------------------
Compiling and installing Apache 2 module...
cd /home/tim/FooBarWidget-
passenger-9dafc631270b045975f817966558f25f41483110
rake clean apache2
(in /home/tim/FooBarWidget-
passenger-9dafc631270b045975f817966558f25f41483110)
rake aborted!
Could not find Apache Portable Runtime (APR).
/home/tim/FooBarWidget-
passenger-9dafc631270b045975f817966558f25f41483110/Rakefile:37
(See full trace by running task with --trace)

--------------------------------------------
It looks like something went wrong

found this thread, even though I only have one apache install I tried
this:
export PATH=/usr/local/apache2/bin:"${PATH}"

try again ... same result as above.

thoughts/ideas greatly appreciated!

THX
Tim

On Apr 16, 3:48 pm, Johnpg <joh...@gmail.com> wrote:
> Fantastic! The trick was to make sure that the bin directory of my
> custom Apacheinstallwas in my path before any other Apache installs.

tmac

unread,
May 28, 2008, 3:31:10 PM5/28/08
to Phusion Passenger Discussions
In case it's of use to anyone the solution for me turned out to be:
export APR_CONFIG=/usr/local/apache2/bin/apr-1-config

gberz3

unread,
Jun 23, 2008, 10:45:01 PM6/23/08
to Phusion Passenger Discussions


On May 28, 3:31 pm, tmac <mcintyre....@gmail.com> wrote:
> In case it's of use to anyone the solution for me turned out to be:
> export APR_CONFIG=/usr/local/apache2/bin/apr-1-config
>


I still can't get it to work. I'm on a BSD 6.3 system. Any ideas?
I've installed APR from source and still nothing.
Reply all
Reply to author
Forward
0 new messages