Tôi đã cập nhật lên MacOS 10.15 (Catalina) ngày hôm nay. Khi tôi chạy mongod
trong terminal, nó không thể tìm thấy /data/db
thư mục:
➜ /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 >
Tôi đã cố gắng cài đặt MongoDB với brew
:
brew install mongodb
➜ /Users/william > brew install mongodb
Updating Homebrew...
Error: mongodb: unknown version :mountain_lion
Có ai giúp đỡ không?