4

I tried to update my Arch system today and pacman is trying to update itself, and is unable to do so due to dependancy breaking. The error is this:

    :: Synchronizing package databases...
 core                                                                133,9 KiB   542K/s 00:00 [#######################################################] 100%
 extra                                                              1644,6 KiB   392K/s 00:04 [#######################################################] 100%
 community                                                             4,9 MiB   485K/s 00:10 [#######################################################] 100%
 multilib                                                            169,3 KiB   576K/s 00:00 [#######################################################] 100%
:: Starting full system upgrade...
:: Replace ilmbase with extra/openexr? [Y/n] y
warning: liblastfm-qt5: local (1.1.0.r637-4) is newer than extra (1.0.9-4)
warning: python2-mutagen: local (1.42.0-3) is newer than antergos (1.38-2)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing pacman (5.2.0-2) breaks dependency 'pacman<5.2' required by pamac

Any sugestions how to solve this issue?

Giacomo1968
  • 58,727
Amuoeba
  • 453
  • 3
  • 5
  • 11

3 Answers3

3

It depends on where the pamac package actually comes from.

  • When a third-party binary repository package (Antergos and Manjaro both count as 'third-party') has a versioned dependency on a standard Arch package:

    1. Cancel the update and wait for the repository to get a new version, with the dependencies updated. (There already is pamac v9.0.2 with support for pacman 5.2 so it shouldn't take long.)
  • When an AUR package (which you compiled with makepkg yourself), or a package that is no longer in the binary repositories, has a versioned dependency on a repository package:

    1. Remove the AUR package.
    2. Upgrade the system as usual.
    3. Reinstall the latest version of the AUR package, making sure to rebuild it even if you already had the built package cached.
grawity
  • 501,077
1

I had the same problem this morning. (It's not that pacman has a dependency on itself, it's that there's an older version of pamac that has a dependency requiring an older version of pacman.)

I resolved it by:

  1. Uninstalling my pamac-related packages so they don't block upgrading pacman
sudo pacman -R pamac-gtk-dev pamac-cli-dev pamac-common-dev
  1. Then doing the system upgrade
sudo pacman -Syuu
  1. Then reinstalling those pamac packages (this time to the latest versions)
sudo pacman -S pamac-gtk-dev pamac-cli-dev pamac-common-dev
0

Note in your example, pacman does not have dependency on itself, rather pamac is depending on specific version of pacman and upgrading pacman would break that requirement.

This should only be an issue with packages you build yourself (or via some helper). To perform the upgrade, you should probably rebuild/upgrade/etc the blocking package or remove it, but assuming you don't want to do that:

You can use the --assume-installed <package=version> pacman flag, which was added to help upgrades where not all installed packages have been rebuilt.

Note that this would almost certainly break the package which has the dependency, so don't do this for any package which you don't want to break and don't do this if you don't know what you're doing.

Example:

$ pacman <args>
...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing Foo (1.2-1) breaks dependency 'Foo<=1.1' required by Bar
$ pacman <args> --assume-installed 'Foo=1.1'
...
looking for conflicting packages...
...
:: Proceed with installation? [Y/n]