I recently upgraded from Ubuntu 20.04 to Ubuntu 22.04, then uninstalled MongoDB 4.2.
I then followed the instructions on the MongoDB website, to install MongoDB 6.0 and installed the server and tools, which is supposed to automatically install mongosh (mongodb-mongosh) and mongoimport:
apt-get install -y mongodb-org mongodb-database-tools
Following the answers on MongoDB.service failed with result exit-code I managed to get mongod (MongoDB 6.0) to run.
I know mongodb is running because I get:
# mongod --version
db version v6.0.6
Build Info: {
"version": "6.0.6",
"gitVersion": "26b4851a412cc8b9b4a18cdb6cd0f9f642e06aa7",
"openSSLVersion": "OpenSSL 3.0.2 15 Mar 2022",
"modules": [],
"allocator": "tcmalloc",
"environment": {
"distmod": "ubuntu2204",
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
My issue is that I get the errors:
# mongo
mongo: command not found
# mongosh
mongosh: command not found
# mongoimport
mongoimport: command not found
I have also tried reinstalling and rebooting.
I have access to the server via Compass, but no access via Bash. What am I missing?