2011-04-07 100 views
1

我收到此問題。安裝乘客問題

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 

回答

0

這裏是解決方案: -

  1. 編譯乘客源代碼。您可以從here

    下載到從源代碼安裝客運,解壓源碼包:

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

    然後運行包含安裝程序:

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

    乘客安裝將通知有關失蹤依賴。安裝它們

  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 
    

,它會像一個魅力。 :-)

+0

也許你的Ruby在沒有OpenSSl支持的情況下被編譯,這就是問題所在。 – tadman 2011-04-11 14:39:46

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++編譯階段被刷新,所以我無法複製這個問題。不過,我之前沒有遇到麻煩。

+0

那麼最新的解決方案? – 2011-04-07 18:42:33

+0

取決於您的平臺,但安裝帶有開發頭文件的'apr'和'apu'。 – tadman 2011-04-08 14:30:35

+0

檢查我發佈的解決方案。謝謝你的幫助。 – 2011-04-09 10:20:35