此问题已在此处有答案:
Error while gem install on ubuntu 12.04 aws ec2(2个答案)
8年前关闭。
在我的本地机器上,我试图安装一个与日期相关的格式化程序gem,但是在安装时我得到了一些奇怪的错误。
[admin@localhost test_folder]$ gem install formatter-0.0.1.gem
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/rvm/gems/ruby-2.0.0-p353
directory.
我无法在本地安装它。操作系统是CentOS,Ruby版本是Ruby2。
2条答案
按热度按时间wyyhbhjk1#
在这里,改造不是最好的办法。对于本地机器可能是可以的,但对于生产则不行。
rvm被设置为在没有sudo或特定/sudo权限的情况下使用。重新安装会更受欢迎。清除当前的rvm安装rvm内爆
然后关闭所有控制台/bashes/terminales,并使用您希望使用rvm的用户再次登录并再次安装它。
另见此处:在ubuntu 12.04 aws ec2上安装gem时出错
nc1teljy2#
使用
sudo chmod -R 777 specific_folder_path
非常感谢Rajarshi Das