安装passenger和nginx时找不到C编译器gcc

前端之家收集整理的这篇文章主要介绍了安装passenger和nginx时找不到C编译器gcc前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我正在尝试在我的VPS上安装Passenger和Nginx.

我跟随these instructions并将所有源的所有链接替换为当前版本.

但是当我运行Nginx的Phusion Passenger安装程序时,gcc编译器出错了:

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

最佳答案
如果你确实安装了gcc,问题源于/ tmp作为noexec挂载.该错误并不完全有帮助,但如果您将/ tmp重新安装为exec,则可以正确安装乘客.

mount -o remount,rw,exec,nosuid /tmp
原文链接:https://www.f2er.com/nginx/434396.html

猜你在找的Nginx相关文章