如何在没有权限的情况下在Ubuntu中为单个用户安装RVM?

我试图设置RVM在Ubuntu的单用户模式下执行,但不能没有开放权限使configuration等任何build议?

通过bash <<(curl -s https://rvm.beginrescueend.com/install/rvm )安装的RVM,提到的所有apt存储库额外安装

[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. 

所以我检查configuration:

 [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 

没有cc的许可:

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

我可以运行它作为sudo? 不:

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

目前还不清楚你在做什么。 谁closures了这些权限? 您是否在限制帐户中? 如果是这样,那么在其他地方安装一个类似的设置可能会更好,编译所需的一切,然后通过rsync复制到这个帐户。

像我一样,您可能错过了列出仍然需要的apt-get安装的rvm要求<\ b>部分。

# 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