C compiler gcc not found while installing passenger and nginx

后端 未结 6 1537
盖世英雄少女心
盖世英雄少女心 2021-02-15 18:43

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.

But when i ran

相关标签:
6条回答
  • 2021-02-15 18:52

    Have the same problem and the following commands solve it; (on ubuntu server)

    sudo apt-get install linux-kernel-headers
    sudo apt-get install build-essential
    
    0 讨论(0)
  • 2021-02-15 18:55

    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
    
    0 讨论(0)
  • 2021-02-15 18:56

    same problem here and I found out that I am not able to run command as root has to use

     sudo
    

    and it worked like charm

    0 讨论(0)
  • 2021-02-15 19:00

    One quick hack (I struggled a lot with it and finally install pre-built) is to install the pre-built package of Nginx rather than compiling it from source.

    For RHEL/CentOS create the file named /etc/yum.repos.d/nginx.repo with the following contents:

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
    gpgcheck=0
    enabled=1
    

    In above baseurl replace “OS” with “centos” and “OSRELEASE” with “6”.

    Finally execute yum install nginx

    Reference https://nginx.org/en/linux_packages.html#stable

    0 讨论(0)
  • 2021-02-15 19:01

    Got the same error. Just installed gcc and it started working:

    yum install gcc

    0 讨论(0)
  • 2021-02-15 19:03

    Be sure that you sudo, if applicable.

    Example:

    sudo ./configure ...
    
    0 讨论(0)
提交回复
热议问题