安装 Apache Passenger,未找到 Ruby 开发标头
我有一个 RoR 应用程序需要托管在 Apache 上,所以我一直在尝试安装 Apache Passenger。当我运行以下命令时:
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
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:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果像我一样,您正在运行 apt 软件包 ruby1.9.1 而不是 1.8,那么请安装 ruby1.9.1-dev
这对我有用。希望有帮助。
If, like me, you are running the apt package ruby1.9.1 instead of 1.8 then install ruby1.9.1-dev instead
This worked for me. Hope it helps.
安装缺少的标头后,返回到开头并重新编译乘客:
After installing the missing headers, go back to the beginning and recompile passenger:
尝试卸载 ruby1.9 并安装 ruby1.8,然后重新安装乘客 gem。这对我有用。
Try uninstalling ruby1.9 and installing ruby1.8 instead then reinstall the passenger gem. This worked for me.
首次安装软件包:
对于 Ubuntu:
对于 CentOS(很好 教程):
安装 gem 后:
并成功配置它:
First install packages:
for Ubuntu:
for CentOS (good tutorial):
After install gem:
And successfully configurate it:
我发现,对于某些 Passenger 要求,您需要先注销,然后在安装后重新登录到当前用户,然后再让 guest-install-apache2-module 识别更改的配置。
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.