简体   繁体   English

如何在Redhat上安装ruby?没找到红宝石包

[英]How Can I install ruby on Redhat? ruby package not found

I dont' know why I cannot install ruby through yum in my RHEL6.2 How can I fix it. 我不知道为什么我不能在我的RHEL6.2中通过yum安装ruby如何修复它。 I don't wanna install through source. 我不想通过源代码安装。 Any idea? 任何的想法?

[root@kithost ~]# yum install ruby
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
No package ruby available.
Error: Nothing to do

RVM is a solution but it is not that I want. RVM是一个解决方案,但它不是我想要的。

What I want to know is that once we can't find any package from yum, what kind of thing should we fix into order to let yum find it? 我想知道的是,一旦我们找不到任何来自yum的包装,我们应该修复什么样的东西才能让百胜找到它?

Probably the best way to install and manage Ruby is using RVM . 可能安装和管理Ruby的最佳方法是使用RVM Moreover, you can use more than one ruby versions using RVM. 此外,您可以使用RVM使用多个ruby版本。 I can bet, it's really something you may love it. 我敢打赌,这真的是你可能喜欢的东西。 Yum is sometime a curse :-). 百胜有时是一个诅咒:-)。

Follow their installation guide as there are different methods of (with pros and cons) installations and choose your preferred one. 按照他们的安装指南,因为有不同的方法(有利有弊)安装,并选择您喜欢的方法。 I'm pretty sure, you will love it too. 我很确定,你也会喜欢它。

However, if you are still thinking to use it, you may follow this Guide . 但是,如果您仍在考虑使用它,则可以按照本指南进行操作 Be aware, I don't not know whether it works or not as I did not try it. 请注意,我不知道它是否有效,因为我没有尝试过。 Why should I try something else, when I'm already using BEST one :)! 当我已经使用BEST one :)时,为什么还要尝试别的东西呢!

Redhat does not have a free repo list unless you pay, or make subscription to them. Redhat没有免费的回购清单,除非您付款或订阅它们。

The reason for that I cannot install ruby is that there is no availalbe repo list 我无法安装ruby的原因是没有可用的回购列表

check 校验

/etc/repo.list /etc/repo.list

you can copy the one from CentOS to Redhat. 你可以将一个从CentOS复制到Redhat。

Then your yum could search a available repo server and make your ruby downloadable. 然后您的yum可以搜索可用的repo服务器并使您的ruby可下载。

RVM is a good solution but I found that rbenv was much better including when you have to use Ruby on a server. RVM是一个很好的解决方案,但我发现rbenv要好得多,包括必须在服务器上使用Ruby时。

You can find how to install rbenv in the README . 您可以在README中找到如何安装rbenv。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM