This is a simple tutorial shows how to set the priority of a certain package and/or apt repository in Ubuntu, Debian, Linux Mint.
In Ubuntu, we install software packages from different sources, including Ubuntu universe repositories (using Ubuntu Software), Ubuntu PPAs (e.g., LibreOffice, Kodi, GIMP, and more), apps’ own apt repositories (e.g, Chrome, VirtualBox, Opera, and more).
We can even install apps from other Linux Distributions. For instance, installing Linux Mint’s IPTV player, Web App Mananger, and Chromium Browser (in deb format) in Ubuntu is possible.
Why setting priority:
However, installing from mixed software sources may cause following questions:
Lock a package in specified version.
More than one repositories have the same package, but you want to install or receive package updates from a certain repository.
Install only one or two packages from the repository, but refuse all others.
Create and set package priority:
By adding a rule file under /etc/apt/preferences.d/ directory, and pinning a priority will fix the issues.
Just open terminal from system app launcher, and run command to create and edit a config file (replace gedit for other system):
2. Then open terminal either via Ctrl+Alt+T or by searching for “terminal” from app launcher. When it opens, run command to give executable permission:
chmod +x ~/Downloads/hplip-3.21.2.run
3. Finally run command to start installing the driver:
Follow the terminal output and answer the questions. If everything goes OK, plug or re-plug your HP devices and enjoy!
Due to Pyqt5 dependency issue, the package does not install in Ubuntu 20.04. As a workaround, choose “custom” as the installation mode, answer “no” to disable ‘Graphical User Interfaces (Qt5)’, and say “no” when installing the python-reportlab package.