无法在macOS Catalina上创建MongoDB/data/db目录 [英] Unable to create MongoDB /data/db directory on macOS Catalina

查看:57
本文介绍了无法在macOS Catalina上创建MongoDB/data/db目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试创建MongoDB data/db目录时出现以下错误:

I get the following error when I try to create the MongoDB data/db directory:

sudo mkdir -p /data/db 


mkdir: /data/db: Read-only file system

推荐答案

重新安装对我不起作用(它需要禁用SIP,而我不想这样做)因此,我改为移动了mongo文件夹.您应该将旧文件夹放在桌面上的已重定位项目"文件夹下因此,只需将其复制到所需的位置即可(我将其移至用户文件夹中)然后在终端上

The remount didn't work for me (it requires Disabling SIP, which I didn't want to do) So instead I moved the mongo folder. You should have the old folder under the 'Relocated items' folder on your desktop so just copy it wherever you want (I moved it to my user folder) and then in the terminal go

mongod --dbpath /users/<username>/data/db/

希望能帮到你

这篇关于无法在macOS Catalina上创建MongoDB/data/db目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆