0

Since this morning I have been able to resolve unmet dependencies.

In the past always solved it by installing packages one by one, or installing the deb package, but in this case I can't do that.

I need to install libvips-dev in Xubuntu 20.04:

sudo  apt install libvips-dev

The following packages have unmet dependencies: libvips-dev : Depends: libmagickcore-dev Depends: libmagickwand-dev Depends: librsvg2-dev (>= 2.40.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Also

sudo  aptitude install libvips-dev

The following packages have unmet dependencies: librsvg2-dev : Depends: librsvg2-2 (= 2.48.2-1) but 2.48.9-1ubuntu0.20.04.1 is installed Depends: librsvg2-common (= 2.48.2-1) but 2.48.9-1ubuntu0.20.04.1 is installed


The file /etc/apt/sources.list is the original,

In previous searches I saw many solutions and tried:


sudo apt --fix-broken install
sudo apt update --fix-missing
sudo apt dist-upgrade
sudo apt upgrade

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

Reading package lists... Done Building dependency tree
Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


sudo apt autoremove

Reading package lists... Done Building dependency tree
Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


apt --fix-broken install

Reading package lists... Done Building dependency tree
Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

.


sudo apt list --upgradable
Listing... Done

dpkg --get-selections | grep hold
give me nothing

I can not install the library then try with apt or aptitude to install some of their dependencies:

sudo apt install librsvg2-2=2.48.2-1 give me a big list of packages that will be removed

Then with aptitude, the same thing happens:

sudo aptitude install librsvg2-2=2.48.2-1

I must remove a lot of packages.

 Remove the following packages: 1 to 157
 Install the following packages: 157 - 164
 Leave the following dependencies unresolved:  161 to 187

If I do it, the system won't work anymore.


Also try: Synaptic->Edit->Fix Broken Packages

What I am doing wrong?

Is there any other package installer that can scan the repositories and recursively install all needed packages?

I suppose that apt and aptitude must to do it on its own.

The output of apt update is:

:sudo apt update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]      
Get:2 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]       
Hit:3 http://ci.archive.ubuntu.com/ubuntu focal InRelease                      
Get:4 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [473 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1637 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [278 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [40.7 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1098 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [156 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [712 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [557 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [129 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [66.6 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2464 B]
Fetched 5321 kB in 19s (287 kB/s)                                              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
userone@pc:~
:apt list --upgradable
Listing... Done
linux-generic-hwe-20.04/focal-security 5.15.0.43.46~20.04.14 amd64 [upgradable from: 5.15.0.41.44~20.04.13]
linux-headers-generic-hwe-20.04/focal-security 5.15.0.43.46~20.04.14 amd64 [upgradable from: 5.15.0.41.44~20.04.13]
linux-image-generic-hwe-20.04/focal-security 5.15.0.43.46~20.04.14 amd64 [upgradable from: 5.15.0.41.44~20.04.13]
user2232395
  • 101
  • 1
  • Please run apt policy on the troublesome packages and edit the output into your question. I feel it's unlikely that you have not modified your sources (ppas don't show up in sources.list) – Organic Marble Aug 02 '22 at 00:01

1 Answers1

1

Let's look at one of the problematic packages by checking those versions at http://packages.ubuntu.com:

  • librsvg2-2 v2.48.2-1 is in focal
  • librsvg2-2 v2.48.9-1ubuntu0.20.04.1 is in focal-updates

Aha. Look carefully at your sources.

According to your apt update output, you have the focal and focal-security pockets of the Ubuntu repositories enabled.

But you're missing focal-updates

Re-enable that pocket, run another sudo apt update because your sources changed, and then try your install again.

user535733
  • 62,253
  • The sources.list is the original, which line must to enable ? – user2232395 Aug 02 '22 at 10:46
  • There is not any PPA in the sources.list, also the sources.list.d folder was deleted, it only had a reference to visual studio code. – user2232395 Aug 02 '22 at 11:05
  • The question is marked as closed, but is not resolved, Previously to post I try all the command of "How do I resolve unmet dependencies after adding a PPA?" and still can not resolve the problem. – user2232395 Aug 02 '22 at 11:30
  • You must enable the focal-updates lines. Trying to "resolve dependencies" or muck about with PPAs when your own output clearly indicates a more important missing source seems a waste of your effort. – user535733 Aug 02 '22 at 12:53