how can I install a previous version of mongodb-server? I have 1:3.6.3-0ubuntu1 currently

getting the following message (see below) when attempting to install some files they require version 1:3.4.x I have 1:3.6.3-0ubuntu1 currently

The following packages have unmet dependencies: unifi : Depends: mongodb-server (< 1:3.6.0) but 1:3.6.3-0ubuntu1 is to be installed or mongodb-10gen (< 3.6.0) but it is not installable or mongodb-org-server (< 3.6.0) but it is not installable E: Unable to correct problems, you have held broken packages.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Where are you getting your unifi package from? It’s not in the official Ubuntu repositories. From what I can tell, UniFi does not have an official repository for Ubuntu 18.04; it has a repository for Debian 9, and recommends using this script for Ubuntu. Before you risk the security of your server, make sure that your repository is for Ubuntu 18.04 Bionic Beaver and not any other Linux distribution. That means the word bionic should be in the line you add to your sources.list to make the repository work.

If that isn’t helpful, then in order to downgrade with APT, look at all available versions with apt-cache showpkg <package>, then install the correct one with sudo apt install <package>=<version>. A fair warning: this will mean that the package you downgrade won’t ever be upgraded, which could leave your server insecure!