我一直试图没有成功,通过使用命令gem install passenger然后passenger-install-nginx-module在我的服务器上安装Nginx版本的Phusion Passenger(mod_rails)。 一切顺利,直到我在最后得到下面的错误:
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-pcre='/tmp/root-passenger-15796/pcre-8.10' --add-module='/usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/ext/nginx' checking for OS + Linux 2.6.18-028stab070.14 x86_64 checking for C compiler ... found but is not working
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-pcre='/tmp/root-passenger-15796/pcre-8.10' --add-module='/usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/ext/nginx' checking for OS + Linux 2.6.18-028stab070.14 x86_64 checking for C compiler ... found but is not working
./configure:错误:找不到C编译器gcc
我不确定问题可能是什么。 任何build议将不胜感激。 提前致谢!
从隐身模式编辑(而不是添加一百万条评论):
我在这里遵循指南,以便我可以使用postgresql在nginx上运行redmine。 这是通过运行的passenger-install-nginx-module的shell脚本来操纵的
sh ./configure –prefix ='/ opt / nginx'–with-http_ssl_module –with-cc-opt =' – Wno-error'–add-module ='/ usr / lib / ruby / gems / 1.8 /gems/passenger-3.0.9/ext/nginx”
试图与乘客安装nginx后…
以下是引发此错误的相关代码行: http : //pastebin.com/GwrJcEkf
这里是吐出的config.log的副本: http : //pastebin.com/qkepYZ6X
我最终在Ubuntu11和Debian 6上遇到了同样的问题。
./configure: error: C compiler gcc is not found
你没有安装gcc,你正在尝试用gcc编译一些东西。
sudo apt-get install gcc
apt-get install build-essential (如果需要的话,sudo)在Debian中为我解决了一个类似的问题。
根据 Phusion Passenger的作者Hongli Lai的介绍,请检查/tmp是否安装有noexec选项。 如果没有,我build议你从源代码手动编译,它会工作。