gem install passenger
我一直尝试使用以下命令在我的服务器上安装 Phusion Passenger (mod_rails) 的 Nginx 版本,但没有成功passenger-install-nginx-module
。一切都很顺利,直到最后出现以下错误:
# 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: error: C compiler gcc is not found
I'm not really sure what the problem could be. Any suggestions would be greatly appreciated. Thanks in advance!
Edits from Incognito (rather than adding a million comments):
I'm following the guides here so that I can run redmine on nginx using postgresql. This is rigged by a shell script from passenger-install-nginx-module
which runs
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'
尝试使用 Passenger 安装 nginx 后...
以下是引发此错误的相关代码行:http://pastebin.com/GwrJcEkf
以下是输出的 config.log 的副本:http://pastebin.com/qkepYZ6X
我最终得到了精确的Ubuntu11 和 Debian 6 上也存在同样的问题。
答案1
./configure: error: C compiler gcc is not found
您没有安装 gcc 但您正在尝试用 gcc 编译某些东西。
sudo apt-get install gcc
答案2
apt-get install build-essential
(如果需要的话,请使用 sudo)在 Debian 中为我解决了类似的问题。
答案3
根据Phusion Passenger 的作者 Hongli Lai,请检查您是否/tmp
安装了noexec
此选项。如果没有,我建议您从源代码手动编译,这样就可以了。