mac系统使用homebrew 无法安装nodejs解决方案

时间:2022-07-02 20:19:14

各种查,说是权限问题,但是赋权之后还是一样的错误。

后来终于在* 上找到了解决方案,太不容易了。。。

http://*.com/questions/28460953/homebrew-install-issue-after-computer-restoration

Alex-Taipales-MacBook:Library alextaipale$ git remote -v
origin https://github.com/Homebrew/homebrew (fetch)
origin https://github.com/Homebrew/homebrew (push)
Alex-Taipales-MacBook:Library alextaipale$ cd /usr
Alex-Taipales-MacBook:usr alextaipale$ sudo rm -rf local
Password:
Alex-Taipales-MacBook:usr alextaipale$ sudo git clone https://github.com/Homebrew/homebrew.git
Cloning into 'homebrew'...
remote: Counting objects: 230841, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 230841 (delta 8), reused 10 (delta 7)
Receiving objects: 100% (230841/230841), 53.17 MiB | 716.00 KiB/s, done.
Resolving deltas: 100% (168934/168934), done.
Checking connectivity... done.
Alex-Taipales-MacBook:usr alextaipale$ sudo mv homebrew local
Alex-Taipales-MacBook:usr alextaipale$ sudo chown -R $(whoami) /usr/local