在 Linux 上使用带有 RVM 的 Nginx 安装乘客时出现问题
尝试使用 Nginx 安装 Passenger(在 EC2 Linux 上)。我正在使用 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'.
有什么想法吗?
Tried to install Passenger with Nginx (on EC2 Linux). I'm using ec2-user (instead of Root). Ruby 1.9.2 with RVM.
Passenger gem installs correctly.
But when I try:
passenger-install-nginx-module
I get:
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
* 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
Although the above exist. for instance if I type:
gt; gcc
gt; gcc: no input files
Saw somewhere online that I can try using:
rvmsudo passenger-install-nginx-module
but I get a problem:
--------------------------------------------
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'.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
你必须这样做:
you have to do this:
在尝试安装 Rubies 和/或 Passenger 之前,请确保系统上存在编译器和所有依赖库。您可以通过运行以下命令获取基于 Ruby 的应用程序的推荐基本依赖项列表。
在尝试安装解释器之前安装“ruby”列出的所有依赖项?
该列表因操作系统而异。
更多信息可以在 RVM 基础文档页面上找到,https://rvm.io/rvm/basics/
~韦恩
Be sure that a compiler and all dependency libraries are present on the system before attempting to install Rubies and/or Passenger. You can obtain a list of recommended base dependencies for Ruby based applications by running the following command.
Install all dependencies listed for 'ruby' before attempting to install the interpreter?
The list varies by OS.
More information can be found on the RVM basics documentation page, https://rvm.io/rvm/basics/
~Wayne
的症状
这可能是未将: 添加到您的 .bashrc (或配置文件或其他内容) 。这可能会导致各种奇怪的问题。
That could be a symptom of not adding:
to your .bashrc (or profile or whatever). That can cause all kinds of weird problems.
我正在将 ruby-1.9.2-p180 与 rvm 一起使用。
cd ~/.rvm/src/ruby-1.9.2-p180/ext/openssl/
红宝石 extconf.rb
使
进行安装
乘客安装gninx模块
Am using ruby-1.9.2-p180 with rvm.
cd ~/.rvm/src/ruby-1.9.2-p180/ext/openssl/
ruby extconf.rb
make
make install
passenger-install-gninx-module
gcc 是错误的可执行文件,Passenger 正在寻找 g++ 。使用以下命令安装它:
passenger-install-nginx-module 应该停止抱怨 gcc 丢失
gcc is the wrong executable, Passenger is looking for g++ . Install it with this:
and passenger-install-nginx-module should stop complaining about gcc missing