7

rvm installs properly through: sudo apt-get install ruby-rvm

When I try to install ruby 1.9.3 I get these errors?

anthony@SnakeDoc:~$ rvm install 1.9.3
mkdir: cannot create directory `/usr/share/ruby-rvm/gems/ruby-1.9.3-p0': Permission      denied
Installing Ruby from source to: /usr/share/ruby-rvm/rubies/ruby-1.9.3-p0, this may take   a while depending on your cpu(s)...

ruby-1.9.3-p0 - #fetching 
ruby-1.9.3-p0 - #extracting ruby-1.9.3-p0 to /usr/share/ruby-rvm/src/ruby-1.9.3-p0
/usr/share/ruby-rvm/scripts/functions/utility: line 142: /usr/share/ruby-rvm/log/ruby-    1.9.3-p0/extract.log: Permission denied
/usr/share/ruby-rvm/scripts/functions/utility: line 148: /usr/share/ruby-rvm/log/ruby-  1.9.3-p0/extract.log: Permission denied
ERROR: Error running 'bunzip2 < '/usr/share/ruby-rvm/archives/ruby-1.9.3-p0.tar.bz2' |   tar xf - -C /usr/share/ruby-rvm/tmp/rvm_src_23435', please read /usr/share/ruby-  rvm/log/ruby-1.9.3-p0/extract.log
ERROR: There has been an error while trying to extract the source.  
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.

I tried to chmod the directories where I get access denied but it does not fix the problem. Any suggestions?

penner
  • 2,707
  • 1
  • 37
  • 48
  • 1
    as for the question being closed - it's real problem that users are facing, it is related to the wrong way Ubuntu installs RVM and it is not "off topic" – mpapis Feb 11 '12 at 16:56
  • 1
    voted to reopen since this just happened to me... seems like the people in the ruby tag are being heavy handed lately – jcollum Apr 22 '12 at 21:23

1 Answers1

4

Please use this answer: Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v

Your question is not duplicate, but the answer is the same.

Community
  • 1
  • 1
mpapis
  • 52,729
  • 14
  • 121
  • 158
  • Agreed. Installing rvm manually seems popular. I like it because I don't want the package to update itself and mess with my gems. I also recommend the multi-user install. – dgmdan Jan 31 '12 at 00:34
  • 1
    @dgmdan be careful with multi-user installation, in most cases installing as user is just easier and safer choice, I have updated the docs so you might want to get familiar with them: https://rvm.beginrescueend.com/rvm/install/ – mpapis Jan 31 '12 at 00:38
  • 2
    This worked for me after I used auto-remove to uninstall all the extra packages – penner Jan 31 '12 at 00:47