安装乘客的问题

时间:2011-04-07 18:10:29

标签: ruby-on-rails apache2 passenger

我遇到了这个问题。

 passenger-install-apache2-module

已安装Apache2和乘客宝石

    /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/platform_info/apache.rb:277:in `_unmemoized_apr_config_needed_for_building_apache_modules?': undefined local variable or method `test_exe_outdir' for PhusionPassenger::PlatformInfo:Module (NameError)
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/platform_info.rb:92:in `apr_config_needed_for_building_apache_modules?'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/bin/passenger-install-apache2-module:69:in `dependencies'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/abstract_installer.rb:166:in `check_dependencies'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/bin/passenger-install-apache2-module:90:in `install!'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/abstract_installer.rb:63:in `start'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/bin/passenger-install-apache2-module:236
        from /usr/bin/passenger-install-apache2-module:19:in `load'
        from /usr/bin/passenger-install-apache2-module:19

3 个答案:

答案 0 :(得分:1)

此问题已修复,请参阅此处的第一条评论: http://code.google.com/p/phusion-passenger/issues/detail?id=653https://github.com/henare/passenger/compare/issue-653

实际上,只需编辑“... / apache.rb”文件,并将“test_exe_outdir”替换为“tmpexedir”。

答案 1 :(得分:0)

这可能是bug in the Passenger installer,但只有在apr-configapu-config丢失时才会触发。这些是apr包的一部分,或apr-devel在开发版本可选的某些系统上。

当它启动并显示诊断时,它应显示如下内容:

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... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /opt/local/rvm/wrappers/ree-1.8.7-2011.03/rake
 * rack... found
 * Apache 2... found at /usr/sbin/httpd
 * Apache 2 development headers... found at /usr/sbin/apxs
 * 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

如果在到达该点之前崩溃,您可以使用命令行选项指导安装程序使用哪个APR和APU。

我无法在Ruby 1.8.7下安装3.0.6,它在C ++编译阶段被破坏,所以我无法复制这个问题。不过我以前没遇到过麻烦。

答案 2 :(得分:0)

以下是解决方案: -

  1. 编译乘客源代码。您可以从here

    下载

    要从源代码安装Passenger,请提取源tarball:

    tar xzvf passenger-X.X.X.tar.gz
    

    然后运行附带的安装程序:

    ./passenger-X.X.X/bin/passenger-install-apache2-module
    

    passenger-install将通知缺少的依赖项。安装它们

  2. 如果您使用的是ruby 1.9.2,则可能会遇到未安装ssl的问题。试试这个: -

    cd to : /usr/local/src/ruby-1.9.2-p00/ext/openssl (or whatever)  
    sudo ruby extconf.rb
    make install 
    
  3. 运行上一个命令,即

     ./passenger-X.X.X/bin/passenger-install-apache2-module
    
  4. 它会像魅力一样起作用。 : - )