2012-02-17 84 views
5

我有一個需要在Apache上託管的RoR應用程序,所以我一直在嘗試安裝Apache Passenger。當我運行以下命令:安裝Apache Passenger,未找到Ruby Development Header

sudo passenger-install-apache2-module 

我得到:

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 

所以問我運行以下命令:

sudo apt-get install ruby1.8-dev 

,我已經得到下面的結果做到了這一點

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. 

所以當我運行時:

sudo passenger-install-apache2-module 

我得到相同的結果問我跑:

sudo apt-get install ruby1.8-dev 
+1

你能嘗試紅寶石更高版本?或者用rvm安裝? – simonmorley 2012-03-02 11:40:27

+0

你下載了哪個版本的Enterprise Ruby?另外我假設你使用了一些基於Debian的Linux發行版:Ubuntu?薄荷?請澄清 - 我會嘗試所有虛擬的。我正在運行Ubuntu和Mint和Ubuntu服務器 - 從來沒有任何乘客安裝問題.... – 2012-03-28 22:49:30

回答

0

我發現,你需要註銷,然後重新登錄到當前用戶你已經經過一些乘客要求在passenger-install-apache2-module識別出已更改的配置之前安裝它們。

2

安裝缺少的頭後,回到開始並重新編譯乘客:

gem install passenger 
2

嘗試卸載ruby1.9和安裝ruby1.8的,而不是重新安裝該乘客的寶石。這對我有效。

12

如果像我一樣,你正在運行的apt軟件包ruby1.9.1而不是1.8,然後安裝ruby1.9.1-DEV代替

sudo apt-get install ruby1.9.1-dev 

這爲我工作。希望能幫助到你。