Google Translation:
fjgutierrez wrote:
Hello everyone, yesterday I was trying to uninstall the MongoDB program from my Mac, but the terminal got stuck and now I get the following message every time I start it /dev/fd/12:18: command not found : compdef..... I'm new to this and if someone can give me a hand to solve this error I would appreciate it.
Here are the instructions that should have been followed when uninstalling MongoDB depending on which edition of MongoDB you were using:
https://www.mongodb.com/basics/uninstall-mongodb
It is a bit telling that the uninstall instructions were not included in the user guide although installation instructions were included.
It is possible the issue is with Homebrew damaging one of the zsh configuration files when uninstall was interrupted. Or maybe it is some other MongoDB item that is still configured to automatically launch during boot, but since part of MongoDB is now gone, you get this error. Try to uninstall MongoDB again. Maybe you will need to reinstall the same version, before you can uninstall it depending on the uninstall utility.
Unfortunately there have been a lot of posts recently where Homebrew has been implicated in causing problems. Unless you are knowledgeable with the command line to fix things, the easiest way forward is likely to start completely over by performing a clean install of macOS by first erasing the disk followed by reinstalling macOS & restoring from a backup.
FYI, if you are going to use command line utilities such as Homebrew or MacPorts, then you should really learn more about the command line. Just because these utilities appear simple to use to install open source software not available in a precompiled binary, you still need to know how these items interact with the OS and how to properly manage them within macOS especially since they may also install different versions of built-in macOS command line utilities which can wreak havoc if you don't understand how Homebrew works.
And always have frequent and regular backups of your computer in case something goes wrong so you can restore your data if necessary.