Node.js 由于删除了“/usr/local/lib”和“/usr/local/include”,如何使MacOS识别以前安装的软件包?
由于一些问题,我试图卸载node.js,但我很累。接下来我知道的是…我不小心删除了Mac Mojave中的两个文件夹,Node.js 由于删除了“/usr/local/lib”和“/usr/local/include”,如何使MacOS识别以前安装的软件包?,node.js,mongodb,macos,homebrew,Node.js,Mongodb,Macos,Homebrew,由于一些问题,我试图卸载node.js,但我很累。接下来我知道的是…我不小心删除了Mac Mojave中的两个文件夹,/usr/local/lib和/usr/local/include 我重新安装了操作系统。令我惊讶的是,我所有的个人文件都保留了下来,由homebrew和npm安装的文件也保留了下来。我注意到以前安装的npm包是可用的,但是我需要按照Intermanl建议的命令重新链接它们。到目前为止还不错 然而,mongodb可能不是这样。当我运行mongo时,我得到一个错误:-bash:mo
/usr/local/lib
和/usr/local/include
我重新安装了操作系统。令我惊讶的是,我所有的个人文件都保留了下来,由homebrew
和npm
安装的文件也保留了下来。我注意到以前安装的npm包是可用的,但是我需要按照Intermanl建议的命令重新链接它们。到目前为止还不错
然而,mongodb可能不是这样。当我运行mongo
时,我得到一个错误:-bash:mongod:command-notfound
。我的问题:如何让我的系统识别mongo
以下是这些步骤的复制:
$ brew install mongodb-community@4.0
Warning: mongodb/brew/mongodb-community 4.0.9 is already installed and up-to-date
To reinstall 4.0.9, run `brew reinstall mongodb-community`
$ brew services start mongodb-community@4.0
Service `mongodb-community` already started, use `brew services restart mongodb-community` to restart.
$ brew services restart mongodb-community@4.0
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
$ mongo
-bash: mongo: command not found
我过去不小心删除了/usr/本地内容。为了把brew的东西拿回来,我使用了
brew重新安装$(brew列表)
注:python@3:我必须brew删除--强制--忽略依赖项python@3
由于权限冲突而发出重新安装命令之前