Can't install Ruby on Rails with RVM on Ubuntu 13.04

后端 未结 9 801
独厮守ぢ
独厮守ぢ 2020-12-31 17:22

I am trying to install RVM on my Ubuntu machine.

I have used curl to get RVM, but some RVM commands (install, requirements) throw this apt-get error:



        
相关标签:
9条回答
  • 2020-12-31 17:31

    There are some important packages your system needs before install 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:

    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. Run:

    echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
    

    Open a new terminal and test rvm.

    0 讨论(0)
  • 2020-12-31 17:31

    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

    Once I did that, the function type rvm | head -1 returned rvm is a function

    0 讨论(0)
  • 2020-12-31 17:33

    Try disabling repository which appear at 404 sudo apt-get update or viewing logs 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 =)

    0 讨论(0)
  • 2020-12-31 17:43

    \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 . Use these to install RVM with ruby on rails

    0 讨论(0)
  • 2020-12-31 17:49

    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 :) ).

    1. Go to Package Manager, tab Settings, Preferences
    2. In the opened window you'll see Other Software tab or something like that with links to servers. In my case one of these (it's mentioned in the error log that was produced by rvm) was causing errors and was not available (404 errors). I just unchecked it.
    3. run rmv dependencies only when you closed Package Manager, or you'll get error saying that something is locked at the moment.

    And everything now is installed successfully! :)

    0 讨论(0)
  • 2020-12-31 17:52

    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. You should run this command yourself (with sudo) and check for any problems.

    If you have 404s in the output, check that the package sources for the bad URLs are still correct/current. 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.

    If you have something hinting at packages with 'unmet dependencies', try 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!

    0 讨论(0)
提交回复
热议问题