Upgrading MongoDb from 5.0.20 to 6.0.9 on ubuntu 20.04
Hey guys, I am having an issue right now upgrading my mongoDB to v6.0.9
Now I have a server which has a version 5.0.20 and all working fine.
Steps done,
First I updated the ubuntu server from 18.04 to 20.04 (eventually to 22.04).
Then I went to upgrade MongoDB from version 5.0.20 to version 6.0.9.
No issue there, but when I want to check the version it ask me to install mongodb-client
Please note that I installed the packages by downloding them not from apt-get install.
See bellow for more details
Now when I try to manually check the version (mongo --version), It ask me to install mongodb-clients
Command ‘mongo’ not found, but can be installed with:
apt install mongodb-clients
This is what I had before upgrading (as we can see the tools works in v 5.0.20 and mongodb-mongosh is installed)
< mongo --version
MongoDB shell version v5.0.20
Build Info: {
“version”: “5.0.20”,
“gitVersion”: “2cd626d8148120319d7dca5824e760fe220cb0de”,
“openSSLVersion”: “OpenSSL 1.1.1f 31 Mar 2020”,
“modules”: ,
“allocator”: “tcmalloc”,
“environment”: {
“distmod”: “ubuntu1804”,
“distarch”: “x86_64”,
“target_arch”: “x86_64”
}
}>
These are all the packages installed for version 5.0.20.
< dpkg -l | grep mongo
ii mongodb-database-tools 100.8.0 amd64 mongodb-database-tools package provides tools for working with the MongoDB server:
ii mongodb-mongosh 0.15.6 amd64 MongoDB Shell CLI REPL Package
ii mongodb-org 5.0.20 amd64 MongoDB open source document-oriented database system (metapackage)
ii mongodb-org-database 5.0.20 amd64 MongoDB open source document-oriented database system (metapackage)
ii mongodb-org-database-tools-extra 5.0.20 amd64 Extra MongoDB database tools
ii mongodb-org-mongos 5.0.20 amd64 MongoDB sharded cluster query router
ii mongodb-org-server 5.0.20 amd64 MongoDB database server
ii mongodb-org-shell 5.0.20 amd64 MongoDB shell client
ii mongodb-org-tools 5.0.20 amd64 MongoDB tools>
This is what I am trying to upgrade to:
List of all packages downloaded from MongoDB Repositories
<# ls -1
mongodb-database-tools_100.8.0_amd64.deb
mongodb-mongosh_1.10.5_amd64.deb
mongodb-org_6.0.9_amd64.deb
mongodb-org-database_6.0.9_amd64.deb
mongodb-org-database-tools-extra_6.0.9_amd64.deb
mongodb-org-mongos_6.0.9_amd64.deb
mongodb-org-server_6.0.9_amd64.deb
mongodb-org-shell_6.0.9_amd64.deb
mongodb-org-tools_6.0.9_amd64.deb>
Installed with
<dpkg -i *.deb>
Whats is actually installed once upgraded:
<# dpkg --list | grep mongo
ii mongodb-database-tools 100.8.0 amd64 mongodb-database-tools package provides tools for working with the MongoDB server:
ii mongodb-mongosh 1.10.5 amd64 MongoDB Shell CLI REPL Package
ii mongodb-org 6.0.9 amd64 MongoDB open source document-oriented database system (metapackage)
ii mongodb-org-database 6.0.9 amd64 MongoDB open source document-oriented database system (metapackage)
ii mongodb-org-database-tools-extra 6.0.9 amd64 Extra MongoDB database tools
ii mongodb-org-mongos 6.0.9 amd64 MongoDB sharded cluster query router
ii mongodb-org-server 6.0.9 amd64 MongoDB database server
ii mongodb-org-shell 6.0.9 amd64 MongoDB shell client
ii mongodb-org-tools 6.0.9 amd64 MongoDB tools>
At this point I cannot connect to the db in command line or get the version as I mentionned above.
As anyone seen this issue?
Thank you