我在重新安装自制软件时遇到问题。我正在经营小牛队
我从尝试安装express.js开始。 Homebrew已经安装在我的Mac上很长一段时间了,从来没有遇到任何麻烦。我使用sudo npm install -g express
,但是当我运行express --version
时,我找不到命令。最后,我在网上找到了一个可能的解决方案,并尝试使用brew remove npm
和brew install npm
重新安装npm。再次,我遇到了错误(不幸的是,我没有保存确切的错误)我使用brew doctor
试图找出它,查找了大量的教程并用自制软件弄乱了,我想我打破了一些东西。
现在,我想我应该尝试重新安装自制软件。
我运行homebrew的安装命令:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
返回此消息:
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
所以,我跑
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
返回:
-bash: brew: command not found
我再次尝试运行install命令,这次,它并没有告诉我已经安装了自制程序。
再次,我运行homebrew的安装命令:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
现在我明白了:
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
Password:
==> Downloading and installing Homebrew...
remote: Counting objects: 136, done.
remote: Total 136 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (136/136), 10.37 MiB | 1.53 MiB/s, done.
Resolving deltas: 100% (44/44), done.
From https://github.com/Onomanatee/portfolio_Yuri_Legiest
* [new branch] master -> origin/master
HEAD is now at c253261 Commit4
==> Installation successful!
==> Next steps
Run brew doctor before you install anything
Run brew help to get started
然而,运行brew doctor
或brew help
会导致
-bash: brew: command not found
我真的不知道如何解决这个问题。为什么brew安装程序会引用我用作小型Web项目测试的存储库? (正好在安装成功!)