The following packages have unmet dependencies ubuntu как исправить

Occasionally, when I'm installing stuff, I get an error like the following: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using ...

Note: All commands asked to be run must be run in the terminal, which can be opened by either Ctrl+Alt+T or searching for terminal in the dash.

Is it really broken?

Try running the following command and try to reinstall the software you were trying to install

sudo apt-get update

Pre-Perfomance Steps

Backing up

Back up the following files:

  • /etc/apt/sources.list
  • /var/lib/dpkg/status

To do so, use these commands

sudo cp /etc/apt/sources.list /etc/apt/sources.list.original

and

sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.original

Clearing your apt-cache

apt keeps a cache of recently downloaded packages to save bandwidth when it is required to be installed. This can be counter-productive in some cases

Now, to clean it, you have two options

sudo apt-get clean 

This will remove all cached packages belonging to the folder /var/cache/apt/archives/ and /var/cache/apt/archives/partial except the .lock files. This is recommended

sudo apt-get autoclean

This scans the folders /var/cache/apt/archives/ and /var/cache/apt/archives/partial and checks if the package is still in the repositories and removes the ones that aren’t


Fixing dependencies

Using apt’s fix-broken mode

sudo apt-get -f install

This will cause apt to scan for missing dependencies and fix them from the repositories

If the output states that nothing new was installed or upgraded, it has failed.


Checking if all required sources are enabled

Type gksu software-properties-gtk and you’ll get this window

Make sure all sources are enabled.

next, go to the Other software tab and check if the required PPAs for the software to be installed are there and are enabled. Also, try disabling some PPAs which might be having broken packages

now, run sudo apt-get update

Try installing the software now

Selecting a better server to download from

Type gksu software-properties-gtk and you’ll get this window

Click the Download from the Dropdown box and select other

Click Select Best Server

Run sudo apt-get update

Try installing the software

also, try using sudo apt-get install -f


PPA Purge

This is a tool used to purge broken/unwanted ppa’s and their applications along with it

To install it, run

sudo apt-get install ppa-purge

But, Considering the question apt is broken so the above command will fail. So use this command

mkdir ppa-purge && cd ppa-purge && wget http://mirror.pnl.gov/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr56_all.deb && wget http://mirror.pnl.gov/ubuntu//pool/main/a/aptitude/aptitude_0.6.6-1ubuntu1_i386.deb && sudo dpkg -i ./*.deb

Now use ppa purge

sudo ppa-purge ppa:someppa/ppa  

Y-PPA Manager

Y-PPA Manager is a gui app that helps you manage PPA’s and various problems assosiated with it

To install it

sudo add-apt-repository ppa:webupd8team/y-ppa-manager

and

sudo apt-get update

and

sudo apt-get install y-ppa-manager

Considering the question, apt is broken so, use these command instead

sudo su

and

32 Bit:

mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_i386.deb && dpkg -i ./*.deb

64 Bit:

mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_amd64.deb && dpkg -i ./*.deb

Now type in y-ppa-manager

You’ll be presented with this window

Double click on advanced, and you’ll get this window

Do the following Tasks outlined in black


Prevention is better than cure

It is better to prevent than to search for this question on AskUbuntu :D

So, here are the guidelines to keep you safe

Keep your system up-to-date

always run the following command regularly

sudo apt-get update&&sudo apt-get upgrade

or, you can always use Update Manager with this command

gksu update-manager

Using only trusted PPA’s

Only use PPA’s meant to be used on Ubuntu also, only use PPA’s with trusted sources. Infact, the package might already be in the ubuntu repositories

Backing up when things are good and restoring it later

For this you need Y-PPA-Manager. The steps to install it are given above.

Run this command to open Y-PPA-Manager

y-ppa-manager

You’ll be presented with this window

Double click on advanced, and you’ll get this window

Run this:

You’ll be asked to save a tar.gz file with a dialog similar to the one below. Save it in another partition or a safe place

Later, when you need to restore it again, follow similar steps and when you get to the advanced dialog,Click on this:

You’ll be asked to restore from the previous backup which you saved before with a dialog similar to the one below


Still not working?

Package dependency errors are not always generic and depends on the package to be installed.

If following all the steps given to fix the error does not work for you, you can always ask on Ask Ubuntu

Here are some commands which you need to post the output of

sudo apt-get install packagename

and

cat /etc/apt/sources.list

and

cat /etc/apt/sources.list.d/*

(Thanks to Basharat Sial)

There are also other files/commands that you need the output of that might be error specific, and users will probably prompt you in the comments to post the file/command.

При установке пакетов из официальных или сторонних репозиториев вы можете столкнуться с проблемой неудовлетворенные зависимости Ubuntu. Чтобы понять причину возникновения этой ошибки сначала надо разобраться как работают пакетные менеджеры в Linux. Здесь всё компоненты системы, библиотеки и сами программы разделены на пакеты. И если какой-либо программе нужна определенная библиотека, она не поставляется вместе с этой библиотекой, а ожидает, что эта библиотека будет уже установлена в системе.

Установкой библиотек и других компонентов занимается пакетный менеджер, отсюда у каждой программы есть ряд зависимостей которые должны быть удовлетворены чтобы программа смогла заработать.

По английски наша ошибка ещё может писаться как the following packages have unmet dependencies. Она может возникнуть в нескольких случаях, давайте сначала рассмотрим основные из них:

  • Вы используете dpkg для установки deb пакета. Эта утилита не занимается установкой зависимостей. Вместо неё надо использовать apt install или потом просто установить недостающие зависимости с помощью apt, как это делается описано ниже;
  • Вы используете старую версию дистрибутива — в старых версиях могло что-то изменится в репозитории и часть пакетов была удалена или переименована. С LTS версиями такое случается редко, но с обычными релизами вполне может произойти;
  • Вы пытаетесь установить программу не от своего дистрибутива — несмотря на родство всех дистрибутивов семейства Debian, не желательно использовать программы из других дистрибутивов, так, как они могут требовать пакеты, которые в этом дистрибутиве называются по другому;
  • У вас установлен устаревший пакет, который не позволяет обновить некоторые зависимости — случается, когда в системе уже есть какой-нибудь пакет старый пакет, требующий старую версию библиотеки, а новая программа, которую вы собираетесь установить уже хочет более новую версию и не позволяет её обновить. Эта проблема не очень типична для Ubuntu, так как здесь большинство версий программ в репозиториях заморожено, но часто встречается при использовании дистрибутивов с системой роллинг релизов.

1. Обновление и исправление зависимостей

Самое первое что надо сделать при проблемах с зависимостями, это хоть как-нибудь их исправить, потому что иначе пакетный менеджер работать не будет. В некоторых случаях, если списки репозиториев давно не обновлялись их обновление может помочь:

sudo apt update

Далее выполните:

sudo apt install -f

Эта команда установит зависимости, которые есть во официальных репозиториях (поможет при использовании dpkg) и если это не решит проблему, то удалит пакеты, для которых зависимости удовлетворить не удалось. Также после этого можно выполнить:

sudo dpkg --configure -a

А потом повторить предыдущую команду. Следующим шагом можно попробовать обновить систему до самой последней версии. Это тоже может помочь если вы пытаетесь установить пакет из официальных репозиториев и при этом возникает проблема с зависимостями:

sudo apt upgrade
sudo apt full-upgrade

Если причиной вашей проблемы стал устаревший пакет надо его удалить или придумать для него замену. Например, если у вас установлена старая версия php, могут возникнуть проблемы с установкой новой версии, потому что будут конфликтовать версии библиотек, от которых зависит программа. Однако можно найти PPA со специально подготовленной старой версией php, которая ни с кем конфликтовать не будет.

Также подобная проблема может возникать при использовании PPA. Эти репозитории поддерживаются сторонними разработчиками, и могут содержать проблемы, если это ваш вариант, то, лучше поискать альтернативные способы установки необходимой программы.

2. Установка зависимостей

Дальше установка зависимостей Ubuntu. Следующий этап, если вы скачали пакет в интернете, например, от другого дистрибутива с таким же пакетным менеджером, можно попытаться установить таким же способом библиотеки, которые он просит. Это может сработать особенно, если вы пытаетесь установить программу из старой версии дистрибутива. Пакеты можно искать прямо в google или на сайте pkgs.org:

Здесь собрано огромное количество пакетов от различных дистрибутивов, в том числе и от Ubuntu и Debian. Просто выберите нужную версию пакета для вашей архитектуры. Скачать файл можно чуть ниже на странице пакета:

После загрузки пакета с сайта его можно установить через тот же dpkg:

sudo dpkg -i ffmpegthumbs_19.04.3-0ubuntu1~ubuntu19.04~ppa1_amd64.deb

После этого можно снова попробовать установить свой пакет. Но устанавливаемая библиотека может потребовать свои неудовлетворенные зависимости, а та ещё свои, поэтому тянуть программы из других дистрибутивов таким образом не рационально.

3. Удаление зависимостей

Если у вас есть скачанный пакет, и он говорит, что он зависит о версии библиотеки, которой в вашей системе нет, но вы уверены, что ему подойдет и другая версия, то можно просто убрать эту зависимость из пакета. Но для этого надо его перепаковать. Такая ситуация была когда-то с популярным менеджером Viber. Рассмотрим на примере того же вайбера.

Сначала распакуйте пакет в подпапку package командой:

dpkg-deb -x ./viber.deb package

Затем туда же извлеките метаданные пакета:

dpkg-deb --control viber.deb package/DEBIAN

В файле package/DEBIAN есть строчка Depends, где перечислены все библиотеки, от которых зависит пакет и их версии. Просто удалите проблемную библиотеку или измените её версию на ту, которая есть в системе.

vi package/DEBIAN

Затем останется только собрать пакет обратно:

dpkg -b viber package.deb

И можете устанавливать, теперь с зависимостями будет всё верно:

sudo dpkg -i package.deb

Но такое исправление зависимостей Ubuntu следует использовать только для пакетов, которые точно неверно собраны. Важно понимать, что пакетный менеджер вам не враг, а помощник, и то что вы отключите зависимости и установите программу ещё не значит, что она потом будет работать.

4. Распаковать пакет

Следующий способ подойдет, если программа которую вы устанавливаете это библиотека, например, веб-драйвер для Selenium. Пакет можно распаковать и просто разложить исполняемые файлы из него по файловой системе в соответствии с папками внутри архива. Только желательно использовать не корневую файловую систему, а каталог /usr/local/ он как раз создан для этих целей.

5. Использовать snap пакеты

Самый простой способ обойти проблемы с зависимостями — использовать новый формат установщика программ, в котором программа содержит все зависимости в установочном архиве и они устанавливаются аналогично Windows в одну папку. Установка такой программы будет дольше, но зато такие там вы точно не получите проблем с зависимостями Ubuntu. Всё программы, которые поддерживают этот формат есть в центре приложений Ubuntu:

Выводы

В этой статье мы разобрали как исправить проблемы с зависимостями Ubuntu. Некоторые из способов довольно сложные, а другие проще. Но сама эта система, согласно которого пакеты зависят от других, а те ещё от других очень сложная и не удивительно, что время от времени в ней возникают ошибки. А какие способы решения этой проблемы вы знаете? Напишите в комментариях?

Creative Commons License

Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .

Содержание

  1. Неудовлетворенные зависимости Ubuntu
  2. Неудовлетворенные зависимости в Ubuntu
  3. 1. Обновление и исправление зависимостей
  4. 2. Установка зависимостей
  5. 3. Удаление зависимостей
  6. 4. Распаковать пакет
  7. 5. Использовать snap пакеты
  8. Выводы
  9. Announcement
  10. Package Installer — Cannot satisfy dependancies
  11. The following packages have unmet dependencies ubuntu как исправить
  12. Неудовлетворенные зависимости Ubuntu
  13. Неудовлетворенные зависимости в Ubuntu
  14. 1. Обновление и исправление зависимостей
  15. 2. Установка зависимостей
  16. 3. Удаление зависимостей
  17. 4. Распаковать пакет
  18. 5. Использовать snap пакеты
  19. Выводы
  20. How to Fix Unmet Dependencies Error on Ubuntu
  21. Method 1: Use the -f parameter
  22. Method 2: Use Aptitude
  23. Method 3: Make sure that the restricted and universe repositories are enabled and try a better server
  24. Method 4: Clean the package database
  25. Method 5: Eliminate any held packages
  26. Method 6: Purge/Remove/Disable PPAs
  27. «Packages have unmet dependencies» but I don’t want to install these packages anymore. How do I clean this?
  28. 4 Answers 4

Неудовлетворенные зависимости Ubuntu

При установке пакетов из официальных или сторонних репозиториев вы можете столкнуться с проблемой неудовлетворенные зависимости Ubuntu. Чтобы понять причину возникновения этой ошибки сначала надо разобраться как работают пакетные менеджеры в Linux. Здесь всё компоненты системы, библиотеки и сами программы разделены на пакеты. И если какой-либо программе нужна определенная библиотека, она не поставляется вместе с этой библиотекой, а ожидает, что эта библиотека будет уже установлена в системе.

Установкой библиотек и других компонентов занимается пакетный менеджер, отсюда у каждой программы есть ряд зависимостей которые должны быть удовлетворены чтобы программа смогла заработать.

Неудовлетворенные зависимости в Ubuntu

По английски наша ошибка ещё может писаться как the following packages have unmet dependencies. Она может возникнуть в нескольких случаях, давайте сначала рассмотрим основные из них:

  • Вы используете dpkg для установки deb пакета. Эта утилита не занимается установкой зависимостей. Вместо неё надо использовать apt install или потом просто установить недостающие зависимости с помощью apt, как это делается описано ниже;
  • Вы используете старую версию дистрибутива — в старых версиях могло что-то изменится в репозитории и часть пакетов была удалена или переименована. С LTS версиями такое случается редко, но с обычными релизами вполне может произойти;
  • Вы пытаетесь установить программу не от своего дистрибутива — несмотря на родство всех дистрибутивов семейства Debian, не желательно использовать программы из других дистрибутивов, так, как они могут требовать пакеты, которые в этом дистрибутиве называются по другому;
  • У вас установлен устаревший пакет, который не позволяет обновить некоторые зависимости — случается, когда в системе уже есть какой-нибудь пакет старый пакет, требующий старую версию библиотеки, а новая программа, которую вы собираетесь установить уже хочет более новую версию и не позволяет её обновить. Эта проблема не очень типична для Ubuntu, так как здесь большинство версий программ в репозиториях заморожено, но часто встречается при использовании дистрибутивов с системой роллинг релизов.

1. Обновление и исправление зависимостей

Самое первое что надо сделать при проблемах с зависимостями, это хоть как-нибудь их исправить, потому что иначе пакетный менеджер работать не будет. В некоторых случаях, если списки репозиториев давно не обновлялись их обновление может помочь:

sudo apt update

sudo apt install -f

Эта команда установит зависимости, которые есть во официальных репозиториях (поможет при использовании dpkg) и если это не решит проблему, то удалит пакеты, для которых зависимости удовлетворить не удалось. Также после этого можно выполнить:

sudo dpkg —configure -a

А потом повторить предыдущую команду. Следующим шагом можно попробовать обновить систему до самой последней версии. Это тоже может помочь если вы пытаетесь установить пакет из официальных репозиториев и при этом возникает проблема с зависимостями:

sudo apt upgrade
sudo apt full-upgrade

Если причиной вашей проблемы стал устаревший пакет надо его удалить или придумать для него замену. Например, если у вас установлена старая версия php, могут возникнуть проблемы с установкой новой версии, потому что будут конфликтовать версии библиотек, от которых зависит программа. Однако можно найти PPA со специально подготовленной старой версией php, которая ни с кем конфликтовать не будет.

Также подобная проблема может возникать при использовании PPA. Эти репозитории поддерживаются сторонними разработчиками, и могут содержать проблемы, если это ваш вариант, то, лучше поискать альтернативные способы установки необходимой программы.

2. Установка зависимостей

Дальше установка зависимостей Ubuntu. Следующий этап, если вы скачали пакет в интернете, например, от другого дистрибутива с таким же пакетным менеджером, можно попытаться установить таким же способом библиотеки, которые он просит. Это может сработать особенно, если вы пытаетесь установить программу из старой версии дистрибутива. Пакеты можно искать прямо в google или на сайте pkgs.org:

Здесь собрано огромное количество пакетов от различных дистрибутивов, в том числе и от Ubuntu и Debian. Просто выберите нужную версию пакета для вашей архитектуры. Скачать файл можно чуть ниже на странице пакета:

После загрузки пакета с сайта его можно установить через тот же dpkg:

sudo dpkg -i ffmpegthumbs_19.04.3-0ubuntu1

После этого можно снова попробовать установить свой пакет. Но устанавливаемая библиотека может потребовать свои неудовлетворенные зависимости, а та ещё свои, поэтому тянуть программы из других дистрибутивов таким образом не рационально.

3. Удаление зависимостей

Если у вас есть скачанный пакет, и он говорит, что он зависит о версии библиотеки, которой в вашей системе нет, но вы уверены, что ему подойдет и другая версия, то можно просто убрать эту зависимость из пакета. Но для этого надо его перепаковать. Такая ситуация была когда-то с популярным менеджером Viber. Рассмотрим на примере того же вайбера.

Сначала распакуйте пакет в подпапку package командой:

dpkg-deb -x ./viber.deb package

Затем туда же извлеките метаданные пакета:

dpkg-deb —control viber.deb package/DEBIAN

В файле package/DEBIAN есть строчка Depends, где перечислены все библиотеки, от которых зависит пакет и их версии. Просто удалите проблемную библиотеку или измените её версию на ту, которая есть в системе.

Затем останется только собрать пакет обратно:

dpkg -b viber package.deb

И можете устанавливать, теперь с зависимостями будет всё верно:

sudo dpkg -i package.deb

Но такое исправление зависимостей Ubuntu следует использовать только для пакетов, которые точно неверно собраны. Важно понимать, что пакетный менеджер вам не враг, а помощник, и то что вы отключите зависимости и установите программу ещё не значит, что она потом будет работать.

4. Распаковать пакет

Следующий способ подойдет, если программа которую вы устанавливаете это библиотека, например, веб-драйвер для Selenium. Пакет можно распаковать и просто разложить исполняемые файлы из него по файловой системе в соответствии с папками внутри архива. Только желательно использовать не корневую файловую систему, а каталог /usr/local/ он как раз создан для этих целей.

5. Использовать snap пакеты

Самый простой способ обойти проблемы с зависимостями — использовать новый формат установщика программ, в котором программа содержит все зависимости в установочном архиве и они устанавливаются аналогично Windows в одну папку. Установка такой программы будет дольше, но зато такие там вы точно не получите проблем с зависимостями Ubuntu. Всё программы, которые поддерживают этот формат есть в центре приложений Ubuntu:

Выводы

В этой статье мы разобрали как исправить проблемы с зависимостями Ubuntu. Некоторые из способов довольно сложные, а другие проще. Но сама эта система, согласно которого пакеты зависят от других, а те ещё от других очень сложная и не удивительно, что время от времени в ней возникают ошибки. А какие способы решения этой проблемы вы знаете? Напишите в комментариях?

Источник

Announcement

  • Join Date: Apr 2016
  • Posts: 6
  • Location: Bury, Lancashire, UK
  • Send PM

Package Installer — Cannot satisfy dependancies

Hopefully, this question isn’t as embarrassingly stupid as the one I asked before .

Anyway, to get my Epson XP-600 to work in Linux is to download and install a couple of .deb files from the Epson Support site. These have installed and worked with every single disro of Linux I’ve tried recently — and believe me, I’ve tried many recently after getting bored with Windows and wanted to be more ‘hands-on’ with my computer a bit like I was in the Amiga days — ah, memories.

Anyway, on Kubuntu 16.04 I can’t install them I just get a message from the Package Installer stating Error: Cannot satisfy dependencies

I’ve included a couple of screengrabs so you can see what I’m blathering about.

Could you please help with this one, I need to be able to use my printer on Kubuntu and I don’t want to be forced into using a different distro.


  • Join Date: May 2007
  • Posts: 1778
  • Location: Currently Dayton, Ohio
  • Send PM

I have similar problems from time to time. Notice the Details tab. It might tell you what dependency(s) is/are missing.

Because Kubuntu 16.04 is a Beta, still in development stages, perhaps that file isn’t perfected yet. There are thousands of printers out there that have to have drivers created for them to work in Linux machines. That coward microsoft has made sure of that.

If you spent time in Kubuntu 14.04 LTS, and I assume you have, (when you mentioned the other distributions you have tried) most everything currently in use in Kubuntu 16.04 has been more or less perfected in Kubuntu 14.04 LTS.

If you find that the drivers are not yet perfected in K16.04, you might separate a part of your HDD and install K14.04 LTS for your important activities. You can still work in the cutting edge Beta Kubuntu 16.04 while they are perfecting things, and still have more security in your Operating System.

The only thing I can see that you could do that would be really stupid would be to return to Windows just because a Linux Beta isn’t ready to meet all of your computing needs. You never know, they may include the needed dependency in tomorrows update and the problem is solved.

Download and create either a DVD or a USB ISO of Kubuntu 14.04 LTS and open the trial version. Do not install, just try it. Try the printer out after fulfilling any configuration that may or may not come up. It is likely that it will work without further effort.

If it works, IMHO you should partition your HDD and install Kubuntu 14.04 LTS. It is a perfect time to do so, because the last Operating System installed becomes first on the list to boot. If not familiar with the process, get help here on the forum.

Definitely do not go back to Windows; tough it out in Kubuntu, or any other Linux distribution, until you are comfortable with the differences. You will be glad you did. It is that way for all who persist. Good Luck, friend Shab

Hopefully, this question isn’t as embarrassingly stupid as the one I asked before .

Anyway, to get my Epson XP-600 to work in Linux is to download and install a couple of .deb files from the Epson Support site. These have installed and worked with every single disro of Linux I’ve tried recently — and believe me, I’ve tried many recently after getting bored with Windows and wanted to be more ‘hands-on’ with my computer a bit like I was in the Amiga days — ah, memories.

Anyway, on Kubuntu 16.04 I can’t install them I just get a message from the Package Installer stating Error: Cannot satisfy dependencies

I’ve included a couple of screengrabs so you can see what I’m blathering about.

Could you please help with this one, I need to be able to use my printer on Kubuntu and I don’t want to be forced into using a different distro.

Источник

The following packages have unmet dependencies ubuntu как исправить

Неудовлетворенные зависимости Ubuntu

При установке пакетов из официальных или сторонних репозиториев вы можете столкнуться с проблемой неудовлетворенные зависимости Ubuntu. Чтобы понять причину возникновения этой ошибки сначала надо разобраться как работают пакетные менеджеры в Linux. Здесь всё компоненты системы, библиотеки и сами программы разделены на пакеты. И если какой-либо программе нужна определенная библиотека, она не поставляется вместе с этой библиотекой, а ожидает, что эта библиотека будет уже установлена в системе.

Установкой библиотек и других компонентов занимается пакетный менеджер, отсюда у каждой программы есть ряд зависимостей которые должны быть удовлетворены чтобы программа смогла заработать.

Неудовлетворенные зависимости в Ubuntu

По английски наша ошибка ещё может писаться как the following packages have unmet dependencies. Она может возникнуть в нескольких случаях, давайте сначала рассмотрим основные из них:

  • Вы используете dpkg для установки deb пакета. Эта утилита не занимается установкой зависимостей. Вместо неё надо использовать apt install или потом просто установить недостающие зависимости с помощью apt, как это делается описано ниже;
  • Вы используете старую версию дистрибутива — в старых версиях могло что-то изменится в репозитории и часть пакетов была удалена или переименована. С LTS версиями такое случается редко, но с обычными релизами вполне может произойти;
  • Вы пытаетесь установить программу не от своего дистрибутива — несмотря на родство всех дистрибутивов семейства Debian, не желательно использовать программы из других дистрибутивов, так, как они могут требовать пакеты, которые в этом дистрибутиве называются по другому;
  • У вас установлен устаревший пакет, который не позволяет обновить некоторые зависимости — случается, когда в системе уже есть какой-нибудь пакет старый пакет, требующий старую версию библиотеки, а новая программа, которую вы собираетесь установить уже хочет более новую версию и не позволяет её обновить. Эта проблема не очень типична для Ubuntu, так как здесь большинство версий программ в репозиториях заморожено, но часто встречается при использовании дистрибутивов с системой роллинг релизов.

1. Обновление и исправление зависимостей

Самое первое что надо сделать при проблемах с зависимостями, это хоть как-нибудь их исправить, потому что иначе пакетный менеджер работать не будет. В некоторых случаях, если списки репозиториев давно не обновлялись их обновление может помочь:

sudo apt update

sudo apt install -f

Эта команда установит зависимости, которые есть во официальных репозиториях (поможет при использовании dpkg) и если это не решит проблему, то удалит пакеты, для которых зависимости удовлетворить не удалось. Также после этого можно выполнить:

sudo dpkg —configure -a

А потом повторить предыдущую команду. Следующим шагом можно попробовать обновить систему до самой последней версии. Это тоже может помочь если вы пытаетесь установить пакет из официальных репозиториев и при этом возникает проблема с зависимостями:

sudo apt upgrade
sudo apt full-upgrade

Если причиной вашей проблемы стал устаревший пакет надо его удалить или придумать для него замену. Например, если у вас установлена старая версия php, могут возникнуть проблемы с установкой новой версии, потому что будут конфликтовать версии библиотек, от которых зависит программа. Однако можно найти PPA со специально подготовленной старой версией php, которая ни с кем конфликтовать не будет.

Также подобная проблема может возникать при использовании PPA. Эти репозитории поддерживаются сторонними разработчиками, и могут содержать проблемы, если это ваш вариант, то, лучше поискать альтернативные способы установки необходимой программы.

2. Установка зависимостей

Дальше установка зависимостей Ubuntu. Следующий этап, если вы скачали пакет в интернете, например, от другого дистрибутива с таким же пакетным менеджером, можно попытаться установить таким же способом библиотеки, которые он просит. Это может сработать особенно, если вы пытаетесь установить программу из старой версии дистрибутива. Пакеты можно искать прямо в google или на сайте pkgs.org:

Здесь собрано огромное количество пакетов от различных дистрибутивов, в том числе и от Ubuntu и Debian. Просто выберите нужную версию пакета для вашей архитектуры. Скачать файл можно чуть ниже на странице пакета:

После загрузки пакета с сайта его можно установить через тот же dpkg:

sudo dpkg -i ffmpegthumbs_19.04.3-0ubuntu1

После этого можно снова попробовать установить свой пакет. Но устанавливаемая библиотека может потребовать свои неудовлетворенные зависимости, а та ещё свои, поэтому тянуть программы из других дистрибутивов таким образом не рационально.

3. Удаление зависимостей

Если у вас есть скачанный пакет, и он говорит, что он зависит о версии библиотеки, которой в вашей системе нет, но вы уверены, что ему подойдет и другая версия, то можно просто убрать эту зависимость из пакета. Но для этого надо его перепаковать. Такая ситуация была когда-то с популярным менеджером Viber. Рассмотрим на примере того же вайбера.

Сначала распакуйте пакет в подпапку package командой:

dpkg-deb -x ./viber.deb package

Затем туда же извлеките метаданные пакета:

dpkg-deb —control viber.deb package/DEBIAN

В файле package/DEBIAN есть строчка Depends, где перечислены все библиотеки, от которых зависит пакет и их версии. Просто удалите проблемную библиотеку или измените её версию на ту, которая есть в системе.

Затем останется только собрать пакет обратно:

dpkg -b viber package.deb

И можете устанавливать, теперь с зависимостями будет всё верно:

sudo dpkg -i package.deb

Но такое исправление зависимостей Ubuntu следует использовать только для пакетов, которые точно неверно собраны. Важно понимать, что пакетный менеджер вам не враг, а помощник, и то что вы отключите зависимости и установите программу ещё не значит, что она потом будет работать.

4. Распаковать пакет

Следующий способ подойдет, если программа которую вы устанавливаете это библиотека, например, веб-драйвер для Selenium. Пакет можно распаковать и просто разложить исполняемые файлы из него по файловой системе в соответствии с папками внутри архива. Только желательно использовать не корневую файловую систему, а каталог /usr/local/ он как раз создан для этих целей.

5. Использовать snap пакеты

Самый простой способ обойти проблемы с зависимостями — использовать новый формат установщика программ, в котором программа содержит все зависимости в установочном архиве и они устанавливаются аналогично Windows в одну папку. Установка такой программы будет дольше, но зато такие там вы точно не получите проблем с зависимостями Ubuntu. Всё программы, которые поддерживают этот формат есть в центре приложений Ubuntu:

Выводы

В этой статье мы разобрали как исправить проблемы с зависимостями Ubuntu. Некоторые из способов довольно сложные, а другие проще. Но сама эта система, согласно которого пакеты зависят от других, а те ещё от других очень сложная и не удивительно, что время от времени в ней возникают ошибки. А какие способы решения этой проблемы вы знаете? Напишите в комментариях?

alt=»Creative Commons License» width=»»/>
Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна.

How to Fix Unmet Dependencies Error on Ubuntu

Error The following packages have unmet dependencies has plagued Ubuntu users for a while now, and there are more and more sightings of the error on various versions of Ubuntu. The APT package management system is easy to use, but in some occasions, such as when you’re mixing in third-party dependencies, you might get this error from apt-get.

This happens when you try to install something with the apt system via a terminal, and the installation fails with no obvious problem whatsoever. This issue isn’t limited to any one particular program, but it might happen with quite a few of them. This is because the issue lies in the apt system, and not in the program you’re installing.

There are fortunately quite a few solutions for this, some of which are easier to do, and others more difficult, but if you follow the instructions in the methods below, you will get rid of the error in no time.

Note: Before proceeding with any of the methods, it is advisable that you back up configurations files such as so you can revert back any changes in case something goes wrong. This is done by using the following steps:

  1. Press simultaneously the Alt, Ctrl and T on your keyboard to open a Terminal.
  2. Type in and press Enter.
  3. When the previous command finishes running, type in sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.original and press Enter again.

Method 1: Use the -f parameter

This is the easiest one to try, and only requires adding two more letters to the command that you’re typing. Instead of using sudo apt-get install PACKAGENAME, where PACKAGENAME is the package you’re trying to install with the apt system, use sudo apt-get install -f. The -f parameter will attempt to correct a system which has broken dependencies, after which you’ll be able to install the package in question.

  1. Open a Terminal by pressing Ctrl, Alt and T simultaneously on your keyboard.
  2. Type in sudo apt-get install -f and press Enter to execute it.
  3. Once it’s done, type in sudo dpkg –configure -a, press Enter to run it, and run the command from step 2 once more.

Method 2: Use Aptitude

Aptitude is an alternative of apt-get which you can use as a higher-level package manager. You can use it to try and install your package with it, instead of apt-get, but first you need to install aptitude.

  1. Press simultaneously the Ctrl, Alt, and T keys on your keyboard to open a
  2. Type in sudo apt-get install aptitude and press Enter to execute the command.
  3. Type in sudo aptitude install PACKAGENAME, where PACKAGENAME is the package you’re installing, and press Enter to execute it. This will try to install the package via aptitude instead of apt-get, which should potentially fix the unmet dependencies issue.

Method 3: Make sure that the restricted and universe repositories are enabled and try a better server

  1. Press simultaneously Alt and F2 on your computer, type in software-properties-gtk and press
  2. In the Ubuntu Software tab, make sure that all the repositories (main, universe, restricted, multiverse) are enabled.
  3. Click the list of servers where it says Download from, and choose
  4. Click Select Best Server.
  5. Press Alt, Ctrl and T simultaneously to open a Terminal, and type in sudo apt-get update, then press Once it’s done running, try installing the software again.

Method 4: Clean the package database

A corrupted package database is a potential cause for unmet dependencies, as well as packages not installing properly. However, cleaning the package database can fix this, and you can do it with two commands, which I will explain below. First of all, however, press Ctrl, Alt and T to open a Terminal, and don’t forget to hit Enter after the command in order to run it.

  1. sudo apt-get clean will clean the local repository from all the retrieved package files (.deb). It will remove everything except the lock files from /var/cache/apt/archives, and /var/cache/apt/archives/partial/.
  2. sudo apt-get autoclean will also clean up the retrieved files, but unlike the previous command, this one only removes packages that you can no longer download and are pretty much useless.

Method 5: Eliminate any held packages

Held packages are actually held because there are dependency problems and conflicts which apt can’t solve. Eliminating such packages means that there won’t be any such conflicts, and may consequently fix your issue.

  1. Open a Terminal by pressing Ctrl, Alt and T
  2. Type in sudo apt-get -u dist-upgrade and press If there are any held packages, it will show them, and it is yours to eliminate them.
  3. First try running

sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

and see if it fixes the issue. If it exits with X not upgraded at the end, where X is the number of held packages, you will need to delete them one by one.

  1. To remove a held package, use sudo apt-get remove –dry-run PACKAGENAME (PACKAGENAME is the package you’re trying to remove). The –dry-run parameter makes sure you are informed of whatever happens next. When you’ve removed all packages, try installing the one that caused the problem in the first place, and see what happens.

Method 6: Purge/Remove/Disable PPAs

Personal Package Archives are repositories that are hosted on the Launchpad, and are used to upgrade or install packages that aren’t usually available in the official repositories of Ubuntu. They’re most commonly a cause of unmet dependencies, especially when they’re used to upgrade an existing package from the Ubuntu repository. You can either disable, remove or purge them.

Disable means that packages installed from that PPA will no longer get updates.

  1. Press simultaneously Alt and F2, and run software-properties-gtk.
  2. From the Other Software tab, you will find two lines for every PPA, where one is for the source, and another for the compiled package. To disable a PPA, you should uncheck both lines.

Purge means that all packages in the selected PPA will be downgraded to the version in the official repositories, and will also disable the PPA. To install PPA Purge, you could use sudo apt-get install ppa-purge, but considering that the apt is broken, you should use this command in the Terminal (Alt, Ctrl and T simultaneously, then Enter to run):

mkdir ppa-purge && cd ppa-purge && wget http://mirror.pnl.gov/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr56_all.deb && wget http://mirror.pnl.gov/ubuntu//pool/main/a/aptitude/aptitude_0.6.6-1ubuntu1_i386.deb && sudo dpkg -i ./*.deb

Next, run sudo ppa-purge ppa:someppa/ppa in order to purge the selected PPA. However, since PPA Purge still doesn’t remove a PPA, you can use the commands below to remove the PPA. Ignore the first one if your intentions don’t include removing the installed package.

  1. sudo apt-get autoremove –purge PACKAGENAME
  2. sudo add-apt-repository –remove ppa:someppa/ppa
  3. sudo apt-get autoclean

You should be able to install the necessary package afterwards.

Even though there are quite a few methods above, you should also know that it’s always better to prevent such issues. You should keep your system up-to-date, only use trusted PPAs, and back up when everything is working properly so you can restore later. However, if you’ve forgotten to do these things, use the methods above to fix your issue, and use the prevention methods to make sure you don’

«Packages have unmet dependencies» but I don’t want to install these packages anymore. How do I clean this?

I don’t want to install these packages anymore (they are not compatible with my graphics unit). And so I do not need to install their dependencies using apt-get -f install (as it is suggesting).

What is the way to get rid of these packages and this unmet dependency problem? (I tried apt-get autoclean && apt-get autoremove ).

4 Answers 4

The best way to remove such unmet dependencies that you do not want to satisfy is to use:

Purge ensures that any configuration files in relation to the package are deleted as well. In short, purge would remove anything in relation to the package—and you would be rid of the unmet dependency problem.

At first sight, I would say that the packages are installed.

So if you don’t want them anymore, just remove them:

(Maybe with a -f flag to pass the dependency check.)

Just remove the install-info package.

After two days of «computer hell», I finally got the answer. It wasn’t easy! Uninstall it from synaptic package manager, or from terminal.

I recently upgraded from Xubuntu 14.04 to 14.10, then immediately to 15.04.

BOTH TIMES I got the «unmet dependencies» and «held broken packages» errors and had to remove the install-info package. (Glad it wasn’t a System file.)

It’s an absolute curse to Linux! I don’t know which is worse; fixing a rootkit in Windows, or finding this bug in Ubuntu!

Источник

Error The following packages have unmet dependencies has plagued Ubuntu users for a while now, and there are more and more sightings of the error on various versions of Ubuntu. The APT package management system is easy to use, but in some occasions, such as when you’re mixing in third-party dependencies, you might get this error from apt-get.

This happens when you try to install something with the apt system via a terminal, and the installation fails with no obvious problem whatsoever. This issue isn’t limited to any one particular program, but it might happen with quite a few of them. This is because the issue lies in the apt system, and not in the program you’re installing.

There are fortunately quite a few solutions for this, some of which are easier to do, and others more difficult, but if you follow the instructions in the methods below, you will get rid of the error in no time.

Note: Before proceeding with any of the methods, it is advisable that you back up configurations files such as  so you can revert back any changes in case something goes wrong. This is done by using the following steps:

  1. Press simultaneously the Alt, Ctrl and T on your keyboard to open a Terminal.
  2. Type in  and press Enter.
  3. When the previous command finishes running, type in sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.original and press Enter again.

Method 1: Use the -f parameter

This is the easiest one to try, and only requires adding two more letters to the command that you’re typing. Instead of using sudo apt-get install PACKAGENAME, where PACKAGENAME is the package you’re trying to install with the apt system, use sudo apt-get install -f. The -f parameter will attempt to correct a system which has broken dependencies, after which you’ll be able to install the package in question.

  1. Open a Terminal by pressing Ctrl, Alt and T simultaneously on your keyboard.
  2. Type in sudo apt-get install -f and press Enter to execute it.
  3. Once it’s done, type in sudo dpkg –configure -a, press Enter to run it, and run the command from step 2 once more.

Method 2: Use Aptitude

Aptitude is an alternative of apt-get which you can use as a higher-level package manager. You can use it to try and install your package with it, instead of apt-get, but first you need to install aptitude.

  1. Press simultaneously the Ctrl, Alt, and T keys on your keyboard to open a
  2. Type in sudo apt-get install aptitude and press Enter to execute the command.
  3. Type in sudo aptitude install PACKAGENAME, where PACKAGENAME is the package you’re installing, and press Enter to execute it. This will try to install the package via aptitude instead of apt-get, which should potentially fix the unmet dependencies issue.

Method 3: Make sure that the restricted and universe repositories are enabled and try a better server

  1. Press simultaneously Alt and F2 on your computer, type in software-properties-gtk and press
  2. In the Ubuntu Software tab, make sure that all the repositories (main, universe, restricted, multiverse) are enabled.
  3. Click the list of servers where it says Download from, and choose
  4. Click Select Best Server.
  5. Press Alt, Ctrl and T simultaneously to open a Terminal, and type in sudo apt-get update, then press Once it’s done running, try installing the software again.

Method 4: Clean the package database

A corrupted package database is a potential cause for unmet dependencies, as well as packages not installing properly. However, cleaning the package database can fix this, and you can do it with two commands, which I will explain below. First of all, however, press Ctrl, Alt and T to open a Terminal, and don’t forget to hit Enter after the command in order to run it.

  1. sudo apt-get clean will clean the local repository from all the retrieved package files (.deb). It will remove everything except the lock files from /var/cache/apt/archives, and /var/cache/apt/archives/partial/.
  2. sudo apt-get autoclean will also clean up the retrieved files, but unlike the previous command, this one only removes packages that you can no longer download and are pretty much useless.

Method 5: Eliminate any held packages

Held packages are actually held because there are dependency problems and conflicts which apt can’t solve. Eliminating such packages means that there won’t be any such conflicts, and may consequently fix your issue.

  1. Open a Terminal by pressing Ctrl, Alt and T
  2. Type in sudo apt-get -u dist-upgrade and press If there are any held packages, it will show them, and it is yours to eliminate them.
  3. First try running

sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

and see if it fixes the issue. If it exits with X not upgraded at the end, where X is the number of held packages, you will need to delete them one by one.

  1. To remove a held package, use sudo apt-get remove –dry-run PACKAGENAME (PACKAGENAME is the package you’re trying to remove). The –dry-run parameter makes sure you are informed of whatever happens next. When you’ve removed all packages, try installing the one that caused the problem in the first place, and see what happens.

Method 6: Purge/Remove/Disable PPAs

Personal Package Archives are repositories that are hosted on the Launchpad, and are used to upgrade or install packages that aren’t usually available in the official repositories of Ubuntu. They’re most commonly a cause of unmet dependencies, especially when they’re used to upgrade an existing package from the Ubuntu repository. You can either disable, remove or purge them.

Disable means that packages installed from that PPA will no longer get updates.

  1. Press simultaneously Alt and F2, and run software-properties-gtk.
  2. From the Other Software tab, you will find two lines for every PPA, where one is for the source, and another for the compiled package. To disable a PPA, you should uncheck both lines.

Purge means that all packages in the selected PPA will be downgraded to the version in the official repositories, and will also disable the PPA. To install PPA Purge, you could use sudo apt-get install ppa-purge, but considering that the apt is broken, you should use this command in the Terminal (Alt, Ctrl and T simultaneously, then Enter to run):

mkdir ppa-purge && cd ppa-purge && wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr56_all.deb && wget https://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/pool/main/a/aptitude/aptitude_0.8.10-6ubuntu1_i386.deb && sudo dpkg -i ./*.deb

Next, run sudo ppa-purge ppa:someppa/ppa in order to purge the selected PPA. However, since PPA Purge still doesn’t remove a PPA, you can use the commands below to remove the PPA. Ignore the first one if your intentions don’t include removing the installed package.

  1. sudo apt-get autoremove –purge PACKAGENAME
  2. sudo add-apt-repository –remove ppa:someppa/ppa
  3. sudo apt-get autoclean

You should be able to install the necessary package afterwards.

Even though there are quite a few methods above, you should also know that it’s always better to prevent such issues. You should keep your system up-to-date, only use trusted PPAs, and back up when everything is working properly so you can restore later. However, if you’ve forgotten to do these things, use the methods above to fix your issue, and use the prevention methods to make sure you don’

I have no idea if it is still relevant for you to get help on this, but here is a summary of the things one could do to help in such situation
(from here at Appuals (appuals.com)) :

Method 1: Use the -f parameter (I know you already did that, but I gather everything here altogether)

sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get install -f 

Method 2: Use Aptitude

sudo aptitude install PACKAGENAME

where PACKAGENAME is the package you’re installing,
and press Enter to execute it. This will try to install the package via aptitude instead of apt-get, which should potentially fix the unmet dependencies issue.

Method 3: Make sure that the restricted and universe repositories are enabled and try a better server

software-properties-gtk
  • In the Ubuntu Software tab, make sure that all the repositories (main, universe, restricted, multiverse) are enabled.
  • Click the list of servers where it says “Download from”, and choose
  • Click “Select Best Server”.
  • Press Alt, Ctrl and T simultaneously to open a Terminal, and type in

    sudo apt-get update
    

    then press

    Once it’s done running, try installing the software again.

Method 4: Clean the package database

sudo apt-get clean
sudo apt-get autoclean

Method 5: Eliminate any held packages

sudo apt-get -u dist-upgrade

then (if pb):

sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

and see if it fixes the issue. If it exits with X not upgraded at the end, where X is the number of held packages, you will need to delete them one by one.

To remove a held package,

sudo apt-get remove --dry-run PACKAGENAME

(PACKAGENAME is the package you’re trying to remove). The --dry-run parameter makes sure you are informed of whatever happens next. When you’ve removed all packages, try installing the one that caused the problem in the first place, and see what happens.

Method 6: Purge/Remove/Disable PPAs

Personal Package Archives are repositories that are hosted on the Launchpad, and are used to upgrade or install packages that aren’t usually available in the official repositories of Ubuntu. They’re most commonly a cause of unmet dependencies, especially when they’re used to upgrade an existing package from the Ubuntu repository. You can either disable, remove or purge them.

Then if they still show some dependency issues, let’s purge them:

apt purge packageXX packageYY packageZZ

etc.
until everything is clean

Some say also to edit /var/lib/dpkg/status and remove blocs which have not complete installation but I doubt this really solves problems, it is just hiding it under the carpet.

While there are various ways to install applications in Ubuntu, I prefer to use the apt command in the terminal for installing software.

If you do the same, you may come across a dependency error like this:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 green-recorder : Depends: python-urllib3 but it is not installable
E: Unable to correct problems, you have held broken packages.

Usually on It’s FOSS, you’ll find simple and easy to follow solutions to complicated problems. Unfortunately, this one is not that straightforward.

In this troubleshooting article, I’ll tell you why this error occurs and give some pointers on how to go about solving this issue.

Why do you see the “you have held broken packages” error?

Broken Package Error Ubuntu

You were trying to install an application package, most probably from a PPA or third-party repository.

Applications often need specific versions of libraries and software component (called dependencies). These dependencies may not be part of the application package itself, but they are expected to either be installed on your system already or installed during the installation of the application.

Your Linux system tries to install these dependencies on its own. But if the dependency package version is not available on your system, it gets confused as it has no way to solve this dependency problem.

This is why it informs you that the software you were trying to install depends on XYZ but this XYZ cannot be installed.

Another usecase is when your package can be held is when you try to install two versions of the same software. Say you are installing a specific version of Wine when you have another one installed already.

How to go about fixing the “Unable to correct problems, you have held broken packages” error

You can try a few things to make things work. You need to have some ideas on installing/removing packages in Linux command line to work things out here.

Make sure that your system’s package cache is updated

First, make sure that local package cache is updated. Your system checks this cache for the available packages. It’s possible (but not certain) that the dependency package is seen by the system after the cache update.

sudo apt update

Try installing the troublesome package again and see if it fixes the problem.

Install the dependency

If you try to install the troublesome package again and it still complains about the same dependency error than perhaps that dependency is not available for distribution version.

You may use the apt search command see if you could this library from some other package or name:

sudo apt search package_name

If the package is available, is it the same version as requested by the package you were trying to install?

Try to install the dependency package and see what happens:

sudo apt install dependency_package

You may encounter a dependency chain. You try to install dependency A but it complains of B. Then you try installing B and it complains of C.

It may also happen that when you try to install package C, it is already installed. Check the version of package C. Is it the same version as required by package B? If yes, then removing C and installing it again could help.

Can you get the missing dependency package from some other source?

If the missing dependency package cannot be found on your system (no results in apt search), you may try to get the dependency package from some place else. I know that’s not very convenient thing to do but you don’t have many options here.

For example, in the case of installing shutter, it complained about libgoo-canvas-perl and this library is no more available on Ubuntu system.

sudo apt install shutter
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 shutter : Depends: libgoo-canvas-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

However, since it was available in the previous versions of Ubuntu, I looked for this package on Ubuntu’s package archive and found it under the listing of Ubuntu 14.04 here. I downloaded the .DEB file and installed it.

Now that this dependency package is installed, trying to install the original application (shutter in this case) should not complain about at least this package anymore.

If you cannot find the dependency package anywhere, install the troublesome package from some other source

So in the example above, I tried to install Green Recorder application using its PPA. This application needs python-urllib3 library but unfortunately, this library is not available in my Ubuntu 20.04 system.

[email protected]:~$ apt search python-urllib3
Sorting... Done
Full Text Search... Done

Clearly, this is a poorly packaged application. The developer made it available for Ubuntu 20.04 without realizing that Ubuntu 20.04 doesn’t support Python 2 anymore and all the Python libs now start with python3 prefix. So the python-urllib3 should be python3-urllib3.

If you are in such a situation, maybe check the project’s homepage or search on the internet for an alternate source for installing it. Perhaps there is a Snap/Flatpak version or some user created a PPA for it? If nothing else, you may go with source code option as well.

If you see the held broken package error during update try this

Most of the discussion so far assumed that you see this error while installing a new application. That may not always be the case.

If you see this error when you try updating your system with sudo apt update command, then you’ll have to take a slightly different approach.

First, check which package is being held with this command:

dpkg --get-selections | grep hold

If you see some packages being held, remove them and then go on updating your system or installing the software.

You may also use Synaptic package manager for fixing the broken packages.

Did you manage to fix the issue?

As I had mentioned earlier, there is no straightforward fix for this problem. You’ll have to investigate on your own and see if it can be fixed or not.

Please share in the comments if your problem gets fixed. If not, I may try to help you out.

Понравилась статья? Поделить с друзьями:
  • The following fatal alert was generated 10 the internal error state is 1203
  • The following error was reported 2147943712
  • The following error was encountered while trying to retrieve the url перевод
  • The following error was detected while installing matlab
  • The following error occurred while using kerberos authentication cannot find the computer