我今天更新到了MacOS 10.15(Catalina)。当我mongod
在终端中运行时,找不到/data/db
目录:
➜ /Users/william > mongod
2019-10-08T17:02:44.183+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] MongoDB starting : pid=43162 port=27017 dbpath=/data/db 64-bit host=Williams-MacBook-Pro-6.local
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] db version v4.0.3
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] allocator: system
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] modules: none
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] build environment:
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] distarch: x86_64
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] target_arch: x86_64
2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] options: {}
2019-10-08T17:02:44.211+0800 I STORAGE [initandlisten] exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating
2019-10-08T17:02:44.211+0800 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2019-10-08T17:02:44.211+0800 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2019-10-08T17:02:44.211+0800 I CONTROL [initandlisten] now exiting
2019-10-08T17:02:44.211+0800 I CONTROL [initandlisten] shutting down with code:100
➜ /Users/william >
我试图用安装MongoDB brew
:
brew install mongodb
➜ /Users/william > brew install mongodb
Updating Homebrew...
Error: mongodb: unknown version :mountain_lion
有什么帮助吗?