2013-09-29 186 views
0

我正尝试在VPS服务器中托管Rails应用程序。服务器已经安装了Apache,所以我想先安装乘客,然后乘客apache模块。Passenger Apache模块安装 - 安装程序未找到已安装的库

我已经安装了RVM作为用户,ruby 1.9.3并将其设置为默认的ruby。然后,我们安装了乘客宝石版本3.0.17,因为我们正在迁移rails应用程序,旧服务器中的乘客版本是3.0.17。我能够用命令gem install passenger -v 3.0.17安装乘客宝石。

安装乘客后,我继续尝试使用passenger-install-apache2-module命令安装passenger-apache-module。我得到这样的输出:

Checking for required software... 

* GNU C++ compiler... not found 
* Curl development headers with SSL support... not found 
* OpenSSL development headers... not found 
* Zlib development headers... not found 
* Ruby development headers... found 
* OpenSSL support for Ruby... found 
* RubyGems... found 
* Rake... found at /home/federaltitle/.rvm/wrappers/ruby-1.9.3-p448/rake 
* rack... found 
* Apache 2... found at /usr/local/apache/bin/httpd 
* Apache 2 development headers... found at /usr/bin/apxs 
* Apache Portable Runtime (APR) development headers... found at /usr/local/apache/bin/apr-1-config 
* Apache Portable Runtime Utility (APU) development headers... found at /usr/local/apache/bin/apu-1-config 

Some required software is not installed. 
But don't worry, this installer will tell you how to install them. 

Press Enter to continue, or Ctrl-C to abort. 

当我按下回车键,我得到这样的输出:

Installation instructions for required software 

* To install GNU C++ compiler: 
    Please run yum install gcc-c++ as root. 

* To install Curl development headers with SSL support: 
    Please run yum install curl-devel as root. 

* To install OpenSSL development headers: 
    Please run yum install openssl-devel as root. 

* To install Zlib development headers: 
    Please run yum install zlib-devel as root. 

If the aforementioned instructions didn't solve your problem, then please take 
a look at the Users Guide: 

    /home/federaltitle/.rvm/gems/ruby-1.9.3-p448/gems/passenger-3.0.17/doc/Users guide Apache.html 

但是,当我尝试安装消息(yum install gcc-c++yum install curl-develyum install openssl-devel中提到的库,yum install zlib-devel)作为root用户,它说所有的库已经安装并且是最新的。

服务器详细

OS - CENTOS 6.4 x86_64的

+0

Passenger 3很老旧,当依赖自动检测出现问题时,几乎没有办法找出原因。您应升级到最新版本的Passenger v4.0.19,并使用环境变量VERBOSE = 1运行安装程序。这将告诉你为什么它无法找到依赖关系,尽管它们被安装。 – Hongli

+0

我能够以root身份安装rvm,ruby和passenger,并且问题得到解决。当以用户身份完成时,需要处理许可。 – rubyprince

回答

0

我能够安装RVM,红宝石和乘客的根源,这个问题是固定的。当以用户身份完成时,需要处理许可。但我必须为用户相关的活动在bundle install,rake assets:precompile(必须以root身份执行此操作,因此为本地用户提供sudo权限来执行这些操作)做了一些解决方法。