You are not logged in.

#1 2021-10-09 09:36:17

754888
Member
Registered: 2021-10-09
Posts: 11

[SOLVED] sudo pacman -Syu - dependency cycle detected

Hello everyone,

I've received 'dependency cycle detected' warnings (on regular update today). Is it safe to proceed?

sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: freetype2 will be installed before its harfbuzz dependency
warning: dependency cycle detected:
warning: mesa will be installed before its libglvnd dependency
warning: dependency cycle detected:
warning: smbclient will be installed before its cifs-utils dependency

Packages (201) alembic-1.8.3-2  alsa-card-profiles-1:0.3.38-1  aom-3.1.3-1  apache-2.4.50-1  appstream-0.14.6-1  audit-3.0.5-1  autoconf-archive-1:2021.02.19-2  bison-3.8.1-1  blender-17:2.93.5-1  brltty-6.4-1  btrfs-progs-5.14.1-1  ca-certificates-mozilla-3.71-1  cantarell-fonts-1:0.303-1  chromium-94.0.4606.81-1
               cifs-utils-6.14-1.....   (more packages etc...)

Total Download Size:    836,37 MiB
Total Installed Size:  4940,25 MiB
Net Upgrade Size:       214,71 MiB

:: Proceed with installation? [Y/n]

Thanks in advance

Last edited by 754888 (2021-10-09 10:55:57)

Offline

#2 2021-10-09 10:20:33

dogknowsnx
Guest

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

Seems like you haven't done an update in a while. Install those dependency packages first:

sudo pacman -Sy --asdeps <packagename>

You can try to install the dependencies all at once - in case you still encounter issues, try installing them one at a time and then do the update.

Last edited by dogknowsnx (2021-10-09 10:23:55)

#3 2021-10-09 10:23:27

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,295

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

754888 wrote:

Is it safe to proceed?

Yes.

Offline

#4 2021-10-09 10:43:48

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

arojas wrote:
754888 wrote:

Is it safe to proceed?

Yes.

I did! Everything seems fine smile

Offline

#5 2021-10-09 10:52:51

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

dogknowsnx wrote:

Seems like you haven't done an update in a while. Install those dependency packages first:

sudo pacman -Sy --asdeps <packagename>

You can try to install the dependencies all at once - in case you still encounter issues, try installing them one at a time and then do the update.

I did the installation because those dependencies was already installed (i will mark that post as solved). In the docs https://wiki.archlinux.org/title/pacman … ion_reason they say "When installing a package, it is possible to force its installation reason to dependency with: pacman -S --asdeps package_name", but still don't get it. Can someone please explain it with simple terms? In other words, what could happen in the worst case scenario?

Last edited by 754888 (2021-10-09 10:58:10)

Offline

#6 2021-10-09 10:59:14

dogknowsnx
Guest

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

754888 wrote:

Can someone please explain it with simple terms?

If a package requires other packages/libraries to work properly, the packager includes those packages in the dependency array in order for pacman to install these packages first (and mark them as dependencies).

It also helps in maintaining a tidy system, as dependencies that are no longer needed will show up as orphans and can be removed safely.

EDIT: A worst case scenario would be to mark vital packages that are not listed in any dependency array as such and than let pacman search for orphans and remove them in the process. A similar case may be a forced cascading removal of packages.

See 'man pacman' for a deeper understanding of package management and dependencies.

Last edited by dogknowsnx (2021-10-09 11:37:44)

#7 2021-10-09 11:04:15

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

So, that means, in my case those dependencies where harfbuzz (for freetype2), libglvnd (for mesa) and cifs-utils (for smbclient)? When i did pacman -Q harfbuzz libglvnd cifs-utils those packages where already installed!! So i had to remove them first? (still a bit lost here) Can you please give me an explanation specially for my case?

Last edited by 754888 (2021-10-09 11:05:34)

Offline

#8 2021-10-09 11:07:59

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

I mean, you will do that first:

sudo pacman -Sy --asdeps harfbuzz libglvnd cifs-utils

and then updates, when and only if are no warnings anymore?

sudo pacman -Syu

Offline

#9 2021-10-09 11:12:23

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

or the following? (to install the packages with their dependencies)

sudo pacman -Sy --asdeps freetype2 mesa harfbuzz

and then updates (if are no warnings)

sudo pacman -Syu

Offline

#10 2021-10-09 11:14:18

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

754888 wrote:

or the following? (to install the packages with their dependencies)

sudo pacman -Sy --asdeps freetype2 mesa harfbuzz

and then updates (if are no warnings)

sudo pacman -Syu

i think you meant that right?

Offline

#11 2021-10-09 11:16:10

dogknowsnx
Guest

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

If you try to install a package before its dependencies (given they are actually missing on the system), pacman will issue a warning and abort the installation unless told otherwise. How excactly did you do the update, now?

The '--asdeps' flag will simply store a package as not explicitly installed in pacman's database. If no other package is 'claiming' this package, it will become a so called orphaned package.

Last edited by dogknowsnx (2021-10-09 11:19:25)

#12 2021-10-09 11:17:28

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

I've just pressed Enter (for Y option)

Offline

#13 2021-10-09 11:19:06

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

If i reinstall freetype2 mesa and harfbuzz:

sudo pacman -S freetype2 mesa harfbuzz

can save me in case of future problems?

Last edited by 754888 (2021-10-09 11:21:18)

Offline

#14 2021-10-09 11:23:02

dogknowsnx
Guest

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

754888 wrote:

If i reinstall freetype2 mesa and harfbuzz (...) can save me in case of problems?

It certainly won't do any harm...

#15 2021-10-09 11:27:10

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

I'll do.

So (to get it right) next time it's better to do that first:

sudo pacman -S freetype2 mesa harfbuzz

That was you meant for today, right?

Offline

#16 2021-10-09 11:27:31

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

You're overcomplicating this. A warning is just this, a warning. It is not an error.

"freetype2 will be installed before its harfbuzz dependency", both will still be installed and/or updated just fine, it just means you need to be careful not to risk letting your package updates abort halfway through because then you run the risk of ending up with broken dependencies (in this case, freetype2 being installed/upgraded without its harfbuzz dependency also being installed/upgraded alongside it.)

As long as you just let pacman do its job and install the packages, everything will be installed as it should be and dependencies will be met. You don't need to do anything special.

These dependency cycles cannot be avoided because those packages mutually depend on each other. It doesn't matter which one you decide to install first, you'll get a dependency cycle warning regardless.

Last edited by Ammako (2021-10-09 11:30:36)

Offline

#17 2021-10-09 11:32:46

754888
Member
Registered: 2021-10-09
Posts: 11

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

Ammako wrote:

You're overcomplicating this. A warning is just this, a warning. It is not an error.

"freetype2 will be installed before its harfbuzz dependency", both will still be installed and/or updated just fine, it just means you need to be careful not to risk letting your package updates abort halfway through because then you run the risk of ending up with broken dependencies (in this case, freetype2 being installed/upgraded without its harfbuzz dependency also being installed/upgraded alongside it.)

As long as you just let pacman do its job and install the packages, everything will be installed as it should be and dependencies will be met. You don't need to do anything special.

These dependency cycles cannot be avoided because those packages mutually depend on each other. It doesn't matter which one you decide to install first, you'll get a dependency cycle warning regardless.

I see smile I'll read the Docs for more.
So, thanks! (i've learned a lot about dependencies)

Have a nice weekend smile

Offline

#18 2021-10-09 13:00:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: [SOLVED] sudo pacman -Syu - dependency cycle detected

Indeed everything stemming from that `pacman -Sy --asdeps` suggestion (including that suggestion itself) was bad advice.  The warning you received from pacman was normal and expected.  You will see it every time circularly-dependent packages are updated (freetype and harfbuz may be the most common example of this).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB