When you install packages from official or third-party repositories you can face a problem of unmet dependencies Ubuntu. To understand why this error occurs first you have to understand how the work package managers in Linux. Here, all system components, libraries, and the programs themselves are divided into packets. And if a program requires a certain library, it is not shipped together with this library, and expects that this library will be already installed in the system.
Installing the libraries and other components does the package Manager, hence each application has several dependencies which must be satisfied so that the program could earn.
Unmet dependencies in Ubuntu
English is our mistake can still be written as the following packages have unmet dependencies. It may occur in a few cases, let us first consider the main ones:
- You use dpkg to install a deb package. This utility does not install the dependencies. Instead, it is necessary to use apt install and then just install the missing dependency using apt, as is described below;
- You are using an old version of the distribution – in older versions could something changes in the repository and part of the packages have been deleted or renamed. With the LTS versions, it’s rare, but with the usual releases may occur;
- Are you trying to install a program not from its distribution – despite the kinship of all distributions of the Debian family, it is not advisable to use programs from other distributions, as they may require the packages in this distribution are called differently;
- You have an obsolete package which does not allow to upgrade some dependencies – it happens when the system already has some package the old package requiring the older version of the library, and a new programme you’re installing already wants a newer version and allows to update it. This problem is not very typical for Ubuntu, as most of the software versions in the repositories are frozen, but often found when using distributions with rolling releases.
1. Update and fix dependencies
The first thing to do if you have problems with dependencies, is any way to fix them, because otherwise the package Manager will not work. In some cases, if a list of repositories have not been updated, their update may help:
sudo apt update
sudo apt install-f
This command will install dependencies that are in the official repositories (useful when using dpkg), and if it does not solve the problem, it will remove the packages for which dependencies to satisfy failed. Also you can then run:
sudo dpkg --configure -a
And then to repeat the previous command. Next, you can try to upgrade to the latest version. It can also help if you are trying to install the package from the official repositories and this is a problem with dependencies:
sudo apt upgrade
sudo apt full-upgrade
If the cause of your problem became obsolete the package it is necessary to delete it or to come up with a replacement. For example, if you have an old version of php, you may encounter problems installing the new version, because there are conflicting versions of libraries the program depends on. However, you can find a PPA with a specially prepared old version of php that anyone to interfere will not.
Also, the same problem may occur when you use the PPA. These repositories are supported by third-party developers, and can contain problems, if this is your option, it is better to look for alternative ways to install the necessary programs.
2. Installing dependencies
Further, the installation of dependencies Ubuntu. The next step if you have downloaded the package in the Internet, e.g. from a different distribution with the same package Manager, you can try to install the same way the libraries that it asks for. This can work especially if you are trying to install a program from an older version of the distribution. Packages you can search directly on google or on the website pkgs.org:
It collected a huge number of packages from different distributions, including Ubuntu and Debian from. Simply select the desired version of the package for your architecture. You can download on the page below package:
After you download the package from the website, you can install it using the same dpkg:
sudo dpkg-i ffmpegthumbs_19.04.3-0ubuntu1~ubuntu19.04~ppa1_amd64.deb
After that, you can try again to install your package. But the installed library can demand their unsatisfied dependencies, and that even their own, so to pull programs from other distros thus not rational.
3. Removing dependencies
If you have downloaded the package, and he said that it depends on the version of the library, which you do not have, but you are sure that he will do another version, then you can simply remove this dependency from the package. But for this it is necessary to Repack. This situation was once popular Manager Viber. Consider the example of viber.
First unzip the package to a subfolder of the package with the command:
dpkg-deb -x ./viber.deb package
Then there extract the package metadata:
dpkg-deb --control viber.deb file package/DEBIAN
In the file package/DEBIAN there is a line Depends that lists all the libraries which depend on the package and their versions. Just remove the offending library or change its version to the one that’s in the system.
Then will only have to collect the package back to:
dpkg-b package viber.deb
And you can install now the dependencies will be all right:
sudo dpkg-i package.deb
But the patch is a dependency of Ubuntu should only be used for packages that are precisely assembled incorrectly. It is important to understand what a package Manager is not your enemy and helper, and that you disable the dependencies and install the program does not mean that it will work.
4. Unpack the package
The following method will work if the program that you install this library, for example, a web driver for Selenium. Package you can unpack and simply put executable files from his file system in accordance with the folders inside the archive. Only it is desirable to use a non-root filesystem, and /usr/local/ he just created for that purpose.
5. To use the snap packs
The easiest way to get around dependency issues is to use the new format installer programs, where the program contains all the dependencies in the installation files and they are installed similarly to Windows in one folder. The installation of such a programme would be longer, but there are you will not get problems with dependencies Ubuntu. All the programs that support this format is in the Ubuntu software center:
In this article we discussed how to fix problems with dependencies Ubuntu. Some of the ways are quite difficult and others easier. But the system itself, according to which packages depend on others, and those also from the other very complex and it is not surprising that from time to time it causes errors. What are the ways to solve this problem, you know? Write in the comments?