在 Linux 上使用带有 RVM 的 Nginx 安装乘客时出现问题

发布于 2024-10-31 20:12:24 字数 1458 浏览 3 评论 0原文

尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

停滞 2024-11-07 20:12:24

你必须这样做:

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

you have to do this:

rvm remove 1.9.2 
rvm pkg install openssl
rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr
北风几吹夏 2024-11-07 20:12:24

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

user$ rvm requirements

在尝试安装解释器之前安装“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.

user$ rvm requirements

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

時窥 2024-11-07 20:12:24
Unable to locate the RVM path.

的症状

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

这可能是未将: 添加到您的 .bashrc (或配置文件或其他内容) 。这可能会导致各种奇怪的问题。

Unable to locate the RVM path.

That could be a symptom of not adding:

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

to your .bashrc (or profile or whatever). That can cause all kinds of weird problems.

祁梦 2024-11-07 20:12:24

我正在将 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

亣腦蒛氧 2024-11-07 20:12:24

gcc 是错误的可执行文件,Passenger 正在寻找 g++ 。使用以下命令安装它:

sudo yum install gcc-c++

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

gcc is the wrong executable, Passenger is looking for g++ . Install it with this:

sudo yum install gcc-c++

and passenger-install-nginx-module should stop complaining about gcc missing

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文