2

I'm trying to setup RVM to execute in single user mode on Ubuntu, but can't without opening up permissions make, configure etc. Any suggestions?

RVM installed via bash < <(curl -s https://rvm.beginrescueend.com/install/rvm), all apt repository extras mentioned installed

[testuser@vm2:~] $ rvm install 1.9.2Installing Ruby from source to: /home/testuser/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /home/testuser/.rvm/src/ruby-1.9.2-p290 (already extracted)
Fetching yaml-0.1.4.tar.gz to /home/testuser/.rvm/archives
md5sum: : No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  460k  100  460k    0     0   479k      0 --:--:-- --:--:-- --:--:--  706k
Extracting yaml-0.1.4.tar.gz to /home/testuser/.rvm/src
Configuring yaml in /home/testuser/.rvm/src/yaml-0.1.4.
ERROR: Error running ' ./configure --prefix="/home/testuser/.rvm/usr"  ', please read /home/testuser/.rvm/log/ruby-1.9.2-p290/yaml/configure.log
Compiling yaml in /home/testuser/.rvm/src/yaml-0.1.4.
ERROR: Error running '/usr/bin/make ', please read /home/testuser/.rvm/log/ruby-1.9.2-p290/yaml/make.log
Installing yaml to /home/testuser/.rvm/usr
ERROR: Error running '/usr/bin/make install', please read /home/testuser/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log
ruby-1.9.2-p290 - #configuring 
ERROR: Error running ' ./configure --prefix=/home/testuser/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/home/testuser/.rvm/usr ', please read /home/testuser/.rvm/log/ruby-1.9.2-p290/configure.log
ERROR: There has been an error while running configure. Halting the installation.

So I checked configure:

[2011-09-02 12:52:26]  ./configure --prefix="/home/testuser/.rvm/usr"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/testuser/.rvm/src/yaml-0.1.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

No permission to cc:

[testuser@vm2:~] $ cc
-bash: /usr/bin/cc: Permission denied
[testuser@vm2:~] $ gcc
-bash: /usr/bin/gcc: Permission denied

Could I run it as sudo? Nope:

[testuser@vm2:~] $ sudo cc
cc: no input files
[testuser@vm2:~] $ sudo rvm install 1.9.2
sudo: rvm: command not found

2 Answers 2

1

It's not clear what you are trying to do. Who closed these permissions? Are you on a restricted account? If so, it's probably better to install a similar setup somewhere else, compile everything needed there and copy via rsync to this account then.

3
  • 1
    I'm on a VM at a hosting provider. I have full access to the machine, so I can do sudo, or su to root. I was under the impression its a bad idea to open up make, cc, etc to unprivileged users like the one who will need to run ruby. Was wondering if there was a "right" way for doing this thats over my level of unix gurudom. Sep 2, 2011 at 18:41
  • @juwiley So I think you should just install RVM site-wide and this will do the trick. To do that just install it from a root account.
    – Alex
    Sep 2, 2011 at 18:43
  • Hmmm, the difficult thing is when you do that you have to go through a big rigamarole with using 'rvmsudo' and a lot of path issues. I suppose this is something inherent in RVMs tricky setup. Sep 2, 2011 at 18:46
1

Like me, you probably missed the rvm requirements<\b> section that lists the apt-get installs still required.

# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following: sudo apt-get install /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .