Upgrading MongoDB version
How to update the version of MongoDB on your machine on different platforms and versions.
Upgrading to 3.4 on Ubuntu 16.04 using apt
You must have 3.2 to be able to upgrade to 3.4. This example assumes you are using apt.
Ensure the new version is running with mongo. The shell will print out the MongoDB server version that should be 3.4 now.