我无法让 MongoDB 在我的 mac 上使用 VS 代码
I can't get MongoDB to work in vs code on my mac
我对编码还很陌生,已经在云上使用过 mongodb IDE,但想在我的计算机上使用,但我无法让它工作。
我哪里错了?
我有一个 mac,我正在使用 vs code。
我在这里阅读了很多关于这个问题的文章,并尝试了一些解决方案(如果不是我找到的所有解决方案的话)、阅读文档、观看 YouTube 视频,但未能mongoDB 运行 在 vs 代码中。
我还在 vs code 上安装了扩展并查看了他们的文档。 (也可以使用如何打开游乐场)
我也安装了 homebrew,它也和 mongodb usr/local 文件在同一个地方
这是 mongodb 所在位置的一些照片以及我的终端中的错误
非常感谢您的帮助。
mongod --dbpath=/data
bash: mongod: command not found
<mongodb-install-directory>/bin
bash: mongodb-install-directory: No such file or directory
brew services start mongodb
bash: brew: command not found
/usr/local/mongodb
bash: /usr/local/mongodb: is a directory
mongod
bash: mongod: command not found
export PATH="$PATH:/usr/local/mongodb/bin"
mongod
bash: mongod: command not found
[文件在哪里][1]
在我看来,最好使用 homebrew https://brew.sh/ to install and manage applications on a mac. First thing is to install homebrew and ensure it's properly installed using brew -v(returns the version that was installed). Then https://www.robinwieruch.de/mongodb-macos-setup 应该指导安装 mongodb 并启动它 运行。如果出现任何错误,只需将它们复制并粘贴到 google 并从那里尝试解决方案。祝你好运!
让它工作,必须先卸载自制软件并重新安装。我不确定为什么,但我在另一个 post 上看到了它并且有效。
我对编码还很陌生,已经在云上使用过 mongodb IDE,但想在我的计算机上使用,但我无法让它工作。
我哪里错了?
我有一个 mac,我正在使用 vs code。
我在这里阅读了很多关于这个问题的文章,并尝试了一些解决方案(如果不是我找到的所有解决方案的话)、阅读文档、观看 YouTube 视频,但未能mongoDB 运行 在 vs 代码中。
我还在 vs code 上安装了扩展并查看了他们的文档。 (也可以使用如何打开游乐场)
我也安装了 homebrew,它也和 mongodb usr/local 文件在同一个地方
这是 mongodb 所在位置的一些照片以及我的终端中的错误 非常感谢您的帮助。
mongod --dbpath=/data
bash: mongod: command not found
<mongodb-install-directory>/bin
bash: mongodb-install-directory: No such file or directory
brew services start mongodb
bash: brew: command not found
/usr/local/mongodb
bash: /usr/local/mongodb: is a directory
mongod
bash: mongod: command not found
export PATH="$PATH:/usr/local/mongodb/bin"
mongod
bash: mongod: command not found
[文件在哪里][1]
在我看来,最好使用 homebrew https://brew.sh/ to install and manage applications on a mac. First thing is to install homebrew and ensure it's properly installed using brew -v(returns the version that was installed). Then https://www.robinwieruch.de/mongodb-macos-setup 应该指导安装 mongodb 并启动它 运行。如果出现任何错误,只需将它们复制并粘贴到 google 并从那里尝试解决方案。祝你好运!
让它工作,必须先卸载自制软件并重新安装。我不确定为什么,但我在另一个 post 上看到了它并且有效。