Mongodb is not updated properly from 4.2 to 4.4

杀马特。学长 韩版系。学妹 提交于 2021-01-29 09:40:31

问题


I was using mongodb 4.2.9 on ubuntu 18.04

I installed it with package manager. Now I to update it to 4.4 version used package manager following --> https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ instructions.

Installation was ok but when I write mongod -version command it shows - db version v4.2.9. I tried to re-install again it says mongodb-org is already the newest version (4.4.1). but mongod -version command it shows - db version v4.2.9. How can I get rid of this problem?


回答1:


It looks like mongodb-org is the meta-package depending on all other packages, but it doesn't require dependent packages to be the same version as it is itself. This works fine for installation but doesn't update dependent packages if you install mongodb-org when you already have older individual packages installed.

To fix:

  • Simple solution - apt-get upgrade. All of the other MongoDB packages should get updated.
  • If that doesn't work, manually install all the other packages again: apt-get install mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools.

You also have mongodb-server in there, you should remove it if it's installed and if it's not installed you may consider purging it after ensuring you don't need any part of its configuration for your present deployment.



来源:https://stackoverflow.com/questions/63862784/mongodb-is-not-updated-properly-from-4-2-to-4-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!