[英]Can't install Ruby on Rails with RVM on Ubuntu 13.04
I am trying to install RVM on my Ubuntu machine. 我正在尝试在我的Ubuntu机器上安装RVM。
I have used curl to get RVM, but some RVM commands (install, requirements) throw this apt-get error: 我使用curl来获取RVM,但是一些RVM命令(安装,要求)抛出了这个apt-get错误:
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
type rvm | 输入rvm | head -1 returns
头-1返回
rvm is a function
-bash: type: write error: Broken pipe
which gem 哪个宝石
/usr/bin/gem
I have checked the "Run command as a login shell" option 我已经检查了“运行命令作为登录shell”选项
Steps followed from this tutorial : 本教程的步骤如下:
sudo apt-get install curl
curl -L get.rvm.io | bash -s stable --auto
. ~/.bash_profile
rvm requirements - doesn't work properly
I have also looked at the official RVM documentation , but it seems to be very similar. 我也看过官方的RVM文档 ,但它看起来非常相似。
Any ideas? 有任何想法吗?
UPDATE: I managed to do it. 更新:我设法做到了。 I disabled all the third party ppa URLs and it installed smoothly.
我禁用了所有第三方ppa网址,并且顺利安装。
There are some important packages your system needs before install rvm. 在安装rvm之前,系统需要一些重要的软件包。 Run at the terminal:
在终端运行:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev \
sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake \
libtool bison subversion nodejs
Then install rvm with: 然后安装rvm:
curl -L https://get.rvm.io | bash -s stable --ruby
Now you need to put a setting in your .bashrc
to add rvm to PATH for scripting. 现在,您需要在
.bashrc
设置一个设置,以便将rvm添加到PATH以进行脚本编写。 Run: 跑:
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
Open a new terminal and test rvm. 打开一个新终端并测试rvm。
run 跑
sudo apt-get update
sudo apt-get install build-essential
and then try again. 然后再试一次。
Hye Guys!! Hye Guys !!
I got the solution. 我得到了解决方案。 Actually error is because the information we need for installation is not available at sever define for software & update.
实际上错误是因为我们需要安装的信息在服务器定义软件和更新时不可用。 I change it to from my local "Server from India" (In my case) to "Main Server".
我把它从我当地的“服务器从印度”(在我的情况下)改为“主服务器”。
It's working perfectly for me now :) 它现在对我来说很完美:)
I was having the same problem with my install, and then I fully read the details that terminal left once the install was finished. 我的安装遇到了同样的问题,然后我完全阅读了安装完成后终端留下的详细信息。
Try using source /usr/local/rvm/scripts/rvm
尝试使用
source /usr/local/rvm/scripts/rvm
Once I did that, the function type rvm | head -1
一旦我这样做,函数
type rvm | head -1
type rvm | head -1
returned rvm is a function
type rvm | head -1
返回rvm is a function
Try disabling repository which appear at 404 sudo apt-get update or viewing logs rvm. 尝试禁用出现在404 sudo apt-get update或查看日志rvm的存储库。 The fact is that when you install rvm is trying to update a list of your packages and if you have 404 to go to bed =)
事实是,当你安装rvm试图更新你的包列表,如果你有404去睡觉=)
\\curl -L https://get.rvm.io | bash -s stable --ruby
\\curl -L https://get.rvm.io | bash -s stable --ruby
. \\curl -L https://get.rvm.io | bash -s stable --ruby
。 paste this in your terminal window.I used this.It worked for me.for RVM for ruby \\curl -L https://get.rvm.io | bash -s stable --rails
将它粘贴到你的终端窗口。我用过它。它适用于我。对于ruby
\\curl -L https://get.rvm.io | bash -s stable --rails
RVM.L \\curl -L https://get.rvm.io | bash -s stable --rails
\\curl -L https://get.rvm.io | bash -s stable --rails
. \\curl -L https://get.rvm.io | bash -s stable --rails
。 Use these to install RVM with ruby on rails 使用这些在rails上安装带ruby的RVM
For people that know nothing about Linux or are newbies to Linux (like me) those are steps how to solve this (explanation, that was given above, was not that clear for me :) ). 对于那些对Linux一无所知或者是Linux的新手(像我一样)的人来说,这些是解决这个问题的步骤(上面给出的解释对我来说并不是那么清楚:))。
rmv dependencies
only when you closed Package Manager, or you'll get error saying that something is locked at the moment. rmv dependencies
,否则您将收到错误消息,说明此时已锁定某些内容。 And everything now is installed successfully! 现在一切都安装成功了! :)
:)
The most common symptom of this problem occurs (as seth2810 hinted at ) with non-zero exit codes from an apt-get update
command, which rvm requirements
expects. 此问题的最常见症状(如seth2810 暗示 )具有来自
apt-get update
命令的非零退出代码,这是rvm requirements
期望的。 You should run this command yourself (with sudo) and check for any problems. 您应该自己运行此命令(使用sudo)并检查是否存在任何问题。
If you have 404s in the output, check that the package sources for the bad URLs are still correct/current. 如果输出中有404,请检查错误URL的包源是否仍然正确/最新。 You can remove package sources more easily with
sudo apt-get install software-properties-common
, followed by sudo add-apt-repository --remove {URL_OF_PROBLEM_PACKAGE_SOURCE}
for each failed url. 您可以使用
sudo apt-get install software-properties-common
,然后使用sudo add-apt-repository --remove {URL_OF_PROBLEM_PACKAGE_SOURCE}
为每个失败的URL更轻松地删除包源。
If you have something hinting at packages with 'unmet dependencies', try sudo apt-get -f install
. 如果你有一些暗示包含'unmet dependencies'的软件包,请尝试使用
sudo apt-get -f install
。 This command attempts to fix incomplete installs by fetching missing packages and works most of the time. 此命令尝试通过获取缺少的包来修复不完整的安装,并且大部分时间都在工作。 Otherwise... by this point you probably have a more specific error to google for anyway!
否则......到目前为止,谷歌可能还有一个更具体的错误!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.