Installing Apache Passenger , Ruby Development Headers Not Found
Asked Answered
W

5

5

I have a RoR app that needs to be hosted on Apache, so I have been trying to install Apache Passenger. When I run the following command:

sudo passenger-install-apache2-module

I get:

Checking for required software...

 * GNU C++ compiler... found at /usr/bin/g++
 * Curl development headers with SSL support... found
 * OpenSSL development headers... found
 * Zlib development headers... found
 * Ruby development headers... not found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /usr/local/bin/rake
 * rack... found
 * Apache 2... found at /usr/sbin/apache2
 * Apache 2 development headers... found at /usr/bin/apxs2
 * Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config
 * Apache Portable Runtime Utility (APU) development headers... found at /usr/bin/apu-1-config

So it asked me to run the following command:

sudo apt-get install ruby1.8-dev

and I have done this with the following result

Reading package lists... Done
Building dependency tree       
Reading state information... Done
ruby1.8-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.

So when I run:

sudo passenger-install-apache2-module

I get the same result asking me to run:

sudo apt-get install ruby1.8-dev
Woolgrower answered 17/2, 2012 at 20:32 Comment(2)
Could you try a later version of ruby? Or install with rvm?Lynelllynelle
Which version of Enterprise Ruby did you download? Also I'm assuming you're using some Debian-based Linux distro: Ubuntu? Mint? Please clarify - I'll try all that in a virtual. I'm running Ubuntu and Mint and Ubuntu server - never had any problems with passenger installation....Kruter
C
13

If, like me, you are running the apt package ruby1.9.1 instead of 1.8 then install ruby1.9.1-dev instead

sudo apt-get install ruby1.9.1-dev

This worked for me. Hope it helps.

Carboni answered 24/9, 2012 at 11:41 Comment(0)
A
2

After installing the missing headers, go back to the beginning and recompile passenger:

gem install passenger
Anabelle answered 19/9, 2012 at 19:24 Comment(0)
H
2

Try uninstalling ruby1.9 and installing ruby1.8 instead then reinstall the passenger gem. This worked for me.

Huntsville answered 23/9, 2012 at 9:13 Comment(0)
S
1

First install packages:

  • for Ubuntu:

    sudo apt-get install libcurl4-gnutls-dev
    sudo apt-get install apache2-dev
    
  • for CentOS (good tutorial):

    yum install curl-devel apache2-devel 
    

After install gem:

gem install passenger

And successfully configurate it:

sudo passenger-install-apache2-module
Signorina answered 23/8, 2015 at 13:52 Comment(0)
R
0

I have found that with some Passenger requirements you need to log out of and then log back into the current user after you've installed them before passenger-install-apache2-module recognises the changed configuration.

Roney answered 29/3, 2012 at 17:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.