6

I installed MongoDB with Homebrew. I also created a directory called /data/db.

However, when I run mongod, I get this message:

exception in initAndListen: 98 Unable to lock file: /data/db/mongod.lock Resource temporarily unavailable. Is a mongod instance already running?, terminating

I doubt it's already running because I just installed it. I've quit the terminal and rebooted, but it doesn't help.

Here's a screenshot of my terminal

enter image description here

Any idea what I need to do? Thanks!

Brian O'Neill
  • 4,705
  • 5
  • 22
  • 26

1 Answers1

0

try stopping the mongod service using the command

brew services stop mongod
Narendra Reddy
  • 358
  • 2
  • 6