“gcc requires gcc-libs” interdependency error when updating

Standard

As every day, I do a pacman -Syu when I login into my laptop at work. I prefer to do little updates in a daily basis than update once a month or so.

Today I got an error:

$ sudo pacman -Syu
Password:
:: Synchronizing package databases...
core 106.0 KiB 55.2K/s 00:02 [######################] 100%
extra 1282.4 KiB 61.0K/s 00:21 [######################] 100%
community 1100.4 KiB 63.9K/s 00:17 [######################] 100%
:: The following packages should be upgraded first :
pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] y
resolving dependencies...
looking for inter-conflicts...
error: failed to prepare transaction (could not satisfy dependencies)
:: gcc: requires gcc-libs=4.7.0-3
[xyz@myhost ~]$ sudo pacman -S gcc-libs
:: The following packages should be upgraded first :
pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] y
resolving dependencies...
looking for inter-conflicts...
error: failed to prepare transaction (could not satisfy dependencies)
:: gcc: requires gcc-libs=4.7.0-3

By doing a quick search on the Arch forums, I saw the solution quite fast. For some reason pacman doen’t handle very well the dependency. By making a research I didn’t found nothing relevant, but the solution.

Everywhere say you must upgrade pacman alone with a simple
$ pacman -Sy pacman
But if it doesn’t help, you can do as I did myself. Upgrade the system forcing the upgrade firstly of the conflicting packages, in this case:


$ sudo pacman -Syu gcc-libs
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: The following packages should be upgraded first :
pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] n
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...
Targets (7): gcc-4.7.0-4 libpciaccess-0.13.1-1 libupnp-1.6.17-1 pacman-4.0.3-1 xorg-server-1.12.0.902-1 xorg-server-common-1.12.0.902-1
gcc-libs-4.7.0-4
Total Downloaded Size: 20,34 MiB
Total Installed Size: 80,15 MiB
Net Upgrade Size: 0,00 Mi
Proceed with installation? [Y/n]
:: Downloading packages from core...
gcc-libs-4.7.0-4-i686         815,4 KiB       792K/s 00:01 [###########] 100%
gcc-4.7.0-4-i686               17,6 MiB       1132K/s 00:16 [###########] 100%
pacman-4.0.3-1-i686          523,1 KiB       598K/s 00:01 [###########] 100%
:: Downloading packages from extra...
libpciaccess-0.13.1-1-i686         29,0 KiB      117K/s 00:00 [###########] 100%
.....

Leave a comment