Mongodb installation encountered snag, how to uninstall and reinstall?

  mongodb, question
  1. Install mongodb through online installation method, then execute brew update, and then execute brew install mongodb´╝Ť ; An error is reported at this time:

    Error: You must `brew link makedepend` before mongodb can be installed

2. When searching mongodb’s shell directly, the following error was reported:

MongoDB shell version v3.4.2
 connecting to: mongodb://
 2017-04-18T18:51:28.415+0800 W NETWORK  [thread1] Failed to connect to, in(checking socket for error after poll), reason: Connection refused
 2017-04-18T18:51:28.417+0800 E QUERY    [thread1] Error: couldn't connect to server, connection attempt failed :
 exception: connect failed
 Saving session  ...
 ...copying shared history  ...
 ...saving history...truncating history files  ...
 Deleting expired sessions...148 completed.

3. Excuse me, gentlemen, how should I unload it and reinstall it? Or how can I solve the above problems without unloading? Do bosses have a better installation tutorial? The computer is a Mac system, asking for links and guidance ~ ~ ~ little sister is very grateful.

Run this directly.

Run and reload

brew link makedepend

Is it not good to install docker? ?

Thank you, GG