I’m trying to import data into an Atlas cluster using mongoimport. When I run the command I get an error “command not found”. I have MongDB Server version 4.2.6 installed.
mogoimport is a command line utility to be run from os prompt
Can you run it giving full path?
Could be path issue
I also have oh-my-zsh installed with the mongodb plugin. Could this be the issue?
Assuming you are running
mongoimport from a command shell (which sounds like
zsh in your case), a “command not found” message indicates the
mongoimport binary was not found in the current search path (
PATH environment variable).
What O/S version are you using and how did you install the MongoDB command line tools?
mongoimport isn’t in your path, you can also provide the full path to the binary as suggested by @Ramachandra_Tummala.
The zsh plugin shouldn’t affect finding an executable in any way.
If you’re on a Unix based system, what is returned when you run the following command:
ls "$(which mongo | sed 's/mongo//')" | grep mongo
When I ran the command, it returns a list of the what’s installed in the /usr/local/bin directory (mongo is installed). I’m running OS X (15.4) Catalina.
@joyfulnoiseforyahshu were there any other binaries in that folder that started with
Could you state how you installed the MongoDB package? Did you follow the directions given on the MacOS installation page?
I run MacOS Catalina as well and this is the list of files I get from running that command:
mongo mongod mongodump mongoexport mongofiles mongoimport mongoreplay mongorestore mongos mongostat mongotop
If you don’t see a list similar to the above then you don’t have a full install of the MongoDB tools.
Thank you. I will reinstall mongo and check that I have everything installed.
It works now. Thank you.
Glad you got things working @joyfulnoiseforyahshu! Appreciate the follow up to state that things are going right.