安装passenger和nginx时找不到C编译器gcc [英] C compiler gcc not found while installing passenger and nginx

查看:471
本文介绍了安装passenger和nginx时找不到C编译器gcc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的VPS上安装Passenger和Nginx。

I'm trying to install Passenger and Nginx on my VPS.

我跟着这些说明,并将所有来源的所有链接替换为当前版本。

I followed these instructions and replaced all links of all sources to the current version.

但是当我运行Phusion Passenger安装程序Nginx,出错:

But when i ran the Phusion Passenger installer for Nginx, something with gcc compiler went wrong:

Compiling and installing Nginx...
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/ext/nginx'
checking for OS
 + Linux 2.6.32-220.el6.x86_64 x86_64
checking for C compiler ... not found

./configure: error: C compiler gcc is not found

OBS:我的VPS使用CentOS 6.2 x64

OBS: My VPS works with CentOS 6.2 x64

推荐答案

如果你有gcc安装,问题源于/ tmp被挂载为noexec。该错误不完全有帮助,但如果您重新挂载/ tmp为exec你可以正确安装乘客。

If you do have gcc installed, the problem stems from /tmp being mounted as noexec. The error doesn't exactly help, but if you remount /tmp as exec you can install passenger properly.

mount -o remount,rw,exec,nosuid /tmp

这篇关于安装passenger和nginx时找不到C编译器gcc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆