在 Linux 上安装 Ruby 时出错
我在全新安装的 Linux 上的终端中运行了此命令。
sudo aptget install ruby1.9 libruby1.9 libreadlineruby1.9 irb1.9
我收到此错误:
无法找到包 irbl.9
此命令直接取自 Pickaxe 书籍。关于为什么这不起作用的任何建议?
I ran this command in the terminal on a Fresh Linux install.
sudo aptget install ruby1.9 libruby1.9
libreadlineruby1.9 irb1.9
I'm getting this error:
Unable to locate package irbl.9
This command was taken directly from the Pickaxe book. Any suggestions on why this doesn't work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您复制并粘贴错误,那么问题是 irb1.9 中的 L 而不是 1
If you copied and pasted the error then the problem is that you have an L instead of a 1 in irb1.9
在命令行中,输入:
并查找以 irb1.9 开头的行。我刚刚检查了我的,找不到它,所以可能是 irb1.9 在您的发行版中不可用。并且,它可能已经包含在您的 ruby1.9 中。
也就是说,您可能需要了解一下使用 RVM 安装 Ruby。它为多个 Rubies 创建了一个沙箱,使您可以轻松地来回切换或针对所有已安装的版本测试代码。如果您选择该路线,请务必阅读该页面并完成“安装后”部分。另外,安装后请执行
rvm Notes
并确保拥有所有依赖项,然后阅读有关 使用 gems,特别是“不要使用 sudo...”的部分。At your command-line, type:
and look for a line starting with
irb1.9
. I just checked mine and can't find that, so it might be that irb1.9 isn't available in your distribution. And, it might be that it is already included in your ruby1.9.That said, you might want to look into installing Ruby using RVM. It creates a sandbox for multiple Rubies, allowing you to easily switch back and forth or test code against all your installed versions. If you go that route be sure to read the page and complete the "post install" section. Also, do
rvm notes
after installing and make sure you have all the dependencies, then read the info about using gems, specifically the part that says "DO NOT use sudo...".