Install MongoDB

cp mongodb-macos-x86_64-enterprise-4.2.3/bon/* /usr/local/bin

cp: mongodb-macos-x86_64-enterprise-4.2.3/bon/*: No such file or directory

Could you please link your post to the course you are taking.

From which chapter or lab is coming this command?

M201 chapter one lab. was trying to install MongoDB

The command is supposed to be

sudo cp /path/to/the/mongodb-directory/bin/* /usr/local/bin/
  1. You are missing sudo.
  2. The error message is mongodb-macos-x86_64-enterprise-4.2.3/bon/: No such file or directory*. It means that the file mongodb-macos-x86_64-enterprise-4.2.3/bon/* does not exist.

Are you sure the path is good? I think that it might be because you typed bon instead of bin.

1 Like