因此,我在学校集群上的机器上全局安装了 RVM,我有多个用户将其用于学校项目。当我现在运行捆绑安装时,我收到以下错误:
bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rake-10.1.0.gem': Permission denied
Using rake (10.1.0)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/i18n-0.6.1.gem': Permission denied
Using i18n (0.6.1)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/multi_json-1.7.7.gem': Permission denied
Installing multi_json (1.7.7)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/activesupport-3.2.13.gem': Permission denied
Using activesupport (3.2.13)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/builder-3.0.4.gem': Permission denied
Using builder (3.0.4)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/activemodel-3.2.13.gem': Permission denied
Using activemodel (3.2.13)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/erubis-2.7.0.gem': Permission denied
Using erubis (2.7.0)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/journey-1.0.4.gem': Permission denied
Installing journey (1.0.4)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rack-1.4.5.gem': Permission denied
Installing rack (1.4.5)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rack-cache-1.2.gem': Permission denied
Installing rack-cache (1.2)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/rack-test-0.6.2.gem': Permission denied
Installing rack-test (0.6.2)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/hike-1.2.3.gem': Permission denied
Installing hike (1.2.3)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/tilt-1.4.1.gem': Permission denied
Installing tilt (1.4.1)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/sprockets-2.2.2.gem': Permission denied
Installing sprockets (2.2.2)
mv: cannot remove `/home/benjamin/.bundler/tmp/29173/cache/actionpack-3.2.13.gem': Permission denied
当前用户确实具有 sudo 级别权限,这令人困惑,因此我不确定如何解决此错误。