I have a RoR app that needs to be hosted on Apache, so I have been trying to install Apache Passenger. When I run the following command:
我有一个需要在Apache上托管的RoR应用程序,所以我一直在尝试安装Apache Passenger。当我运行以下命令时:
sudo passenger-install-apache2-module
I get:
我明白了:
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
So it asked me to run the following command:
所以它让我运行以下命令:
sudo apt-get install ruby1.8-dev
and I have done this with the following result
我用以下结果做到了这一点
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.
So when I run:
所以当我跑:
sudo passenger-install-apache2-module
I get the same result asking me to run:
我得到了同样的结果,要求我运行:
sudo apt-get install ruby1.8-dev
5 个解决方案
#1
12
If, like me, you are running the apt package ruby1.9.1 instead of 1.8 then install ruby1.9.1-dev instead
如果像我一样运行apt软件包ruby1.9.1而不是1.8,那么请安装ruby1.9.1-dev
sudo apt-get install ruby1.9.1-dev
This worked for me. Hope it helps.
这对我有用。希望能帮助到你。
#2
2
After installing the missing headers, go back to the beginning and recompile passenger:
安装缺少的标头后,返回到开头并重新编译乘客:
gem install passenger
#3
2
Try uninstalling ruby1.9 and installing ruby1.8 instead then reinstall the passenger gem. This worked for me.
尝试卸载ruby1.9并安装ruby1.8,然后重新安装乘客宝石。这对我有用。
#4
1
First install packages:
首先安装包:
-
for Ubuntu:
对于Ubuntu:
sudo apt-get install libcurl4-gnutls-dev sudo apt-get install apache2-dev
-
for CentOS (good tutorial):
对于CentOS(好教程):
yum install curl-devel apache2-devel
After install gem:
安装gem之后:
gem install passenger
And successfully configurate it:
并成功配置它:
sudo passenger-install-apache2-module
#5
0
I have found that with some Passenger requirements you need to log out of and then log back into the current user after you've installed them before passenger-install-apache2-module recognises the changed configuration.
我发现在乘客安装-apache2-module识别更改后的配置之前,您需要先注销一些Passenger,然后在安装后重新登录当前用户。
#1
12
If, like me, you are running the apt package ruby1.9.1 instead of 1.8 then install ruby1.9.1-dev instead
如果像我一样运行apt软件包ruby1.9.1而不是1.8,那么请安装ruby1.9.1-dev
sudo apt-get install ruby1.9.1-dev
This worked for me. Hope it helps.
这对我有用。希望能帮助到你。
#2
2
After installing the missing headers, go back to the beginning and recompile passenger:
安装缺少的标头后,返回到开头并重新编译乘客:
gem install passenger
#3
2
Try uninstalling ruby1.9 and installing ruby1.8 instead then reinstall the passenger gem. This worked for me.
尝试卸载ruby1.9并安装ruby1.8,然后重新安装乘客宝石。这对我有用。
#4
1
First install packages:
首先安装包:
-
for Ubuntu:
对于Ubuntu:
sudo apt-get install libcurl4-gnutls-dev sudo apt-get install apache2-dev
-
for CentOS (good tutorial):
对于CentOS(好教程):
yum install curl-devel apache2-devel
After install gem:
安装gem之后:
gem install passenger
And successfully configurate it:
并成功配置它:
sudo passenger-install-apache2-module
#5
0
I have found that with some Passenger requirements you need to log out of and then log back into the current user after you've installed them before passenger-install-apache2-module recognises the changed configuration.
我发现在乘客安装-apache2-module识别更改后的配置之前,您需要先注销一些Passenger,然后在安装后重新登录当前用户。