gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 17:12:53 24 4
gpt4 key购买 nike

我正在尝试在我的 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

最佳答案

遇到同样的问题,下面的命令解决了; (在 ubuntu 服务器上)

sudo apt-get install linux-kernel-headers
sudo apt-get install build-essential

关于nginx - 安装 passenger 和 nginx 时找不到 C 编译器 gcc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12770501/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com