ruby安装报错

Error running '__rvm_rm_rf /Users/iwaimai/.rvm/rubies/ruby-2.4.0',
please read /Users/iwaimai/.rvm/log/1546840671_ruby-2.4.0/remove.rubies.log

换了个新的Mac电脑把东西都copy过来了,但是cocoapods需要重新安装

安装的时候又报各种错误,跟升级打怪一样。
下面我记录下我的错误,希望对你有所帮助。

1.我试了半天 决定把 ruby都移除 重新安装
rvm uninstall 2.4.0
报错
Error running '__rvm_rm_rf /Users/iwaimai/.rvm/rubies/ruby-2.4.0',
please read /Users/iwaimai/.rvm/log/1546840671_ruby-2.4.0/remove.rubies.log
接着使用 sudo rvm remove 2.4.0
移除成功
2.安装
rvm install 2.4.0
报错 ERROR: '/usr/local/Cellar' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.


image.png

看提示需要安装brew
安装 brew update
报错
Error: /usr/local/Cellar is not writable. You should change the
ownership and permissions of /usr/local/Cellar back to your
user account:
sudo chown -R $(whoami) /usr/local/Cellar
[图片上传中...(image.png-626cf0-1546845180772-0)]

就按照提示输入
sudo chown -R $(whoami) /usr/local/Cellar
上个命令没反应再次输入

brew update

就开始慢慢加载 最后加载了一堆文件
现在在 输入
rvm install 2.4.0

恭喜ruby终于重装成功了

你可能感兴趣的:(ruby安装报错)