【问题标题】:Problem installing passenger with Nginx with rvm on linux在Linux上使用带有rvm的Nginx安装乘客时出现问题
【发布时间】:2011-04-12 17:07:43
【问题描述】:

尝试使用 Nginx(在 EC2 Linux 上)安装Passenger。我正在使用 ec2-user(而不是 Root)。带有 RVM 的 Ruby 1.9.2。

Passenger gem 安装正确。

但是当我尝试时:

passenger-install-nginx-module

我明白了:

正在检查所需的软件...

 * GNU C++ compiler... not found
 * The 'make' tool... found at /usr/bin/make
 * A download tool like 'wget' or 'curl'... found at /usr/bin/wget
 * Ruby development headers... found
 * OpenSSL support for Ruby... not found
 * RubyGems... found
 * Rake... found at /home/ec2-user/.rvm/wrappers/ruby-1.9.2-p180/rake
 * rack... found
 * Curl development headers with SSL support... not found
 * OpenSSL development headers... not found
 * Zlib development headers... not found

虽然上述情况存在。例如,如果我输入:

$> gcc
$> gcc: no input files

在网上看到可以尝试使用的地方:

rvmsudo passenger-install-nginx-module

但我遇到了一个问题:

--------------------------------------------

Checking for required software...

 * GNU C++ compiler... not found
 * The 'make' tool... found at /usr/bin/make
 * A download tool like 'wget' or 'curl'... found at /usr/bin/wget
 * Ruby development headers... found
 * OpenSSL support for Ruby... not found
 * RubyGems... found
Unable to locate the RVM path. Your RVM installation is probably too old. Please update it with 'rvm update --head && rvm reload && rvm repair all'.

有什么想法吗?

【问题讨论】:

  • 试图按照消息说的做? rvm update --head && rvm reload && rvm repair all
  • 安装所有找不到的库。还写了失败后如何安装
  • @pablob 是的,我做到了。事实上,我刚刚安装了 RVM,所以它是最新的
  • @fl00r 它们已安装(作为根),但我以 ec2 用户身份运行乘客安装程序(这是一个问题吗?)
  • 不应该,因为您使用的是rvmsudo

标签: ruby-on-rails nginx passenger rvm


【解决方案1】:

你必须这样做:

rvm remove 1.9.2 
rvm pkg install openssl
rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr

【讨论】:

  • 现在是:rvm pkg install openssl
【解决方案2】:

在尝试安装 Ruby 和/或Passenger 之前,请确保系统上存在编译器和所有依赖库。您可以通过运行以下命令获取基于 Ruby 的应用程序的推荐基本依赖项列表。

user$ rvm requirements

在尝试安装解释器之前安装为“ruby”列出的所有依赖项? 该列表因操作系统而异。

更多信息可以在 RVM 基础文档页面上找到,https://rvm.io/rvm/basics/

~韦恩

【讨论】:

    【解决方案3】:
    Unable to locate the RVM path.
    

    这可能是不添加的症状:

    [[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
    

    到您的 .bashrc(或配置文件或其他)。这可能会导致各种奇怪的问题。

    【讨论】:

      【解决方案4】:

      我正在使用 ruby-1.9.2-p180 和 rvm。
      cd ~/.rvm/src/ruby-1.9.2-p180/ext/openssl/
      ruby​​ extconf.rb
      制作
      安装
      乘客安装 gninx 模块

      【讨论】:

        【解决方案5】:

        gcc 是错误的可执行文件,Passenger 正在寻找 g++ 。用这个安装它:

        sudo yum install gcc-c++
        

        passenger-install-nginx-module 应该停止抱怨 gcc 丢失

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2019-12-21
          • 1970-01-01
          • 1970-01-01
          • 2016-07-12
          相关资源
          最近更新 更多