Command not found error in CircleCI

If you see something like this on CircleCI builds: 

/bin/bash: mongo: command not found

This is because all of your commands will run in the first container that is listed (primary container). This is typically not the database container, which means that the mongo cli is likely not installed in the primary container. The same can happen for mysql and postgresql.

In these cases you can install the client using sudo apt install or the relevant package manager for the distro your image is running.


- run: sudo apt-get install mongodb-clients

More details on Discuss here:

Was this article helpful?
0 out of 9 found this helpful



Please sign in to leave a comment.