简体   繁体   English

捆绑安装获得全局RVM安装的权限问题

[英]Bundle install gets permission issues with global RVM install

So I have a global install of RVM on a machine that is on a school cluster that I have multiple users using for a school project. 因此,我在学校集群上的一台计算机上安装了RVM的全局安装,该集群中有多个用户用于学校项目。 When I run a bundle install now however I get the following error: 但是,当我现在运行捆绑安装时,出现以下错误:

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

The current user does have sudo level permissions though, which is confusing so I'm not sure how to solve this error. 当前用户确实具有sudo级别权限,这令人困惑,因此我不确定如何解决此错误。

This error doesn't necessarily need to be solved. 不一定需要解决此错误。

Your bundle is installing properly, but it's not able to remove cached gems. 您的捆绑包安装正确,但是无法删除缓存的宝石。 It's a pretty harmless error unless you're running way short on hard drive space. 除非您的硬盘空间不足,否则这是一个非常无害的错误。

I actually get this same error too. 我实际上也遇到了同样的错误。 The problem is that my home directory is remotely mounted, so local root doesn't have permission to modify items there. 问题是我的主目录是远程挂载的,因此本地根目录无权在那里修改项目。 Local root only has global write permissions on local directories. 本地根只对本地目录全局写权限。 I imagine, based on what you describe, that you have the same issue. 我想根据您的描述,您会遇到同样的问题。 You could remove the files manually, or you could instruct rvm to install gems in a directory on the local machine. 您可以手动删除文件,也可以指示rvm在本地计算机上的目录中安装gem。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM