我正嘗試在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-devel
,yum install openssl-devel
中提到的庫,yum install zlib-devel
)作爲root用戶,它說所有的庫已經安裝並且是最新的。
服務器詳細
OS - CENTOS 6.4 x86_64的
Passenger 3很老舊,當依賴自動檢測出現問題時,幾乎沒有辦法找出原因。您應升級到最新版本的Passenger v4.0.19,並使用環境變量VERBOSE = 1運行安裝程序。這將告訴你爲什麼它無法找到依賴關係,儘管它們被安裝。 – Hongli
我能夠以root身份安裝rvm,ruby和passenger,並且問題得到解決。當以用戶身份完成時,需要處理許可。 – rubyprince