1

I've hit a wall with the software updates for Manjaro linux on the desktop. I would like to perform system updates, I go to the update app, or the updates app notifies me of my many outstanding software updates and I start the update process. However, after the updates have downloaded, I usually get a message saying that some of my python packages depend on other python packages and will have a "dependency cycle". I "commit" that transaction in agreement that I'm aware of that issue, but it always happens that the "transaction fails".

I have tried doing partial upgrades of only certain packages as a workaround, but it still fails with a failed transaction.

Here is a run of pacman -Syu:

 sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
:: Replace geoclue2 with extra/geoclue? [Y/n] y
:: Replace libmariadbclient with extra/mariadb-libs? [Y/n] y
:: Replace libsystemd with core/systemd-libs? [Y/n] y
:: Replace pamac with extra/pamac-gtk? [Y/n] y
:: Replace xorg-mkfontdir with extra/xorg-mkfontscale? [Y/n] y
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: bashrc-manjaro will be installed before its bash dependency
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency
warning: dependency cycle detected:
warning: libglvnd will be installed before its mesa dependency
warning: dependency cycle detected:
warning: nvidia-utils will be installed before its libglvnd dependency
warning: dependency cycle detected:
warning: egl-wayland will be installed before its mesa dependency
warning: dependency cycle detected:
warning: xorg-server will be installed before its libglvnd dependency
warning: dependency cycle detected:
warning: nvidia-utils will be installed before its mesa dependency
warning: dependency cycle detected:
warning: x264 will be installed before its ffmpeg dependency
warning: dependency cycle detected:
warning: lib32-harfbuzz will be installed before its lib32-freetype2 dependency
warning: dependency cycle detected:
warning: lib32-libglvnd will be installed before its lib32-mesa dependency
warning: dependency cycle detected:
warning: lib32-nvidia-utils will be installed before its lib32-libglvnd dependency
warning: dependency cycle detected:
warning: python-fixtures will be installed before its python-testtools dependency
warning: dependency cycle detected:
warning: rubygems will be installed before its ruby dependency

Packages (586) 

...snip all my packages...

Total Installed Size:  5498.56 MiB
Net Upgrade Size:       106.28 MiB

:: Proceed with installation? [Y/n] y
(581/581) checking keys in keyring                                       [#########################################] 100%
(581/581) checking package integrity                                     [#########################################] 100%
(581/581) loading package files                                          [#########################################] 100%
(581/581) checking for file conflicts                                    [#########################################] 100%
error: failed to commit transaction (conflicting files)
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/__pycache__/debug.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/__pycache__/error.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/__pycache__/decoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/__pycache__/encoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/__pycache__/eoo.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/decoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/encoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/ber/eoo.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/cer/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/cer/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/cer/__pycache__/decoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/cer/__pycache__/encoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/cer/decoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/cer/encoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/der/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/der/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/der/__pycache__/decoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/der/__pycache__/encoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/der/decoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/der/encoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/native/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/native/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/native/__pycache__/decoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/native/__pycache__/encoder.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/native/decoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/codec/native/encoder.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__pycache__/binary.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__pycache__/calling.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__pycache__/dateandtime.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__pycache__/integer.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__pycache__/octets.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/__pycache__/string.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/binary.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/calling.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/dateandtime.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/integer.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/octets.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/compat/string.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/debug.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/error.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__init__.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/base.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/char.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/constraint.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/error.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/namedtype.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/namedval.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/opentype.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/tag.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/tagmap.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/univ.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/__pycache__/useful.cpython-37.pyc exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/base.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/char.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/constraint.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/error.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/namedtype.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/namedval.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/opentype.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/tag.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/tagmap.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/univ.py exists in filesystem
python-pyasn1: /usr/lib/python3.7/site-packages/pyasn1/type/useful.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__init__.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/_common.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/_version.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/easter.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/relativedelta.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/rrule.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/tzwin.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/__pycache__/utils.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/_common.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/_version.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/easter.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/parser/__init__.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/parser/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/parser/__pycache__/_parser.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/parser/__pycache__/isoparser.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/parser/_parser.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/parser/isoparser.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/relativedelta.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/rrule.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/__init__.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/__pycache__/_common.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/__pycache__/_factories.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/__pycache__/tz.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/__pycache__/win.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/_common.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/_factories.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/tz.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tz/win.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/tzwin.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/utils.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/zoneinfo/__init__.py exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/zoneinfo/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/zoneinfo/__pycache__/rebuild.cpython-37.pyc exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz exists in filesystem
python-dateutil: /usr/lib/python3.7/site-packages/dateutil/zoneinfo/rebuild.py exists in filesystem
Errors occurred, no packages were upgraded.

I can still install individual software packages, happily. But OS updates are frozen in place, and probably a security issue at this point on my local desktop. How can I handle dependency cycles and failed transactions like the above during the standard package updates process?

  • 4
    Were python-pyasn1 and python-dateutil installed with pacman or something else like pip? Have you tried moving those libraries out of the way (or deleting them) to see if that allows pacman to update successfully? – GracefulRestart Apr 15 at 18:28
2

Just glancing through pacman's output, and I see a lot of "/bla/bla exists in file system" messages. That's probably your problem right there. IDK how this might have happened, but pacman doesn't like overwriting files unless it knows for sure that the package you're installing "owns" said files.

I believe you can override this check with the --force option, although you should do so WITH CAUTION, as files might be overwritten with incompatible versions. Also, you'll have to do this every time you bump into such a conflict. This means you'll have to do this EVERY TIME you update either python-dateutil or python-pyasn1.

A more permanent solution might be to delete these files before updating the packages. However, THIS IS EVEN MORE DANGEROUS than the last solution, since it *might* destroy your system (depending on which files you're forced to delete). If you go down this route, make sure you have good backups of all of your most important files, and be sure to keep a live CD/DVD/flash drive/whatever handy in case you need to repair and/or reinstall your system.

Here's a handy way to get a list of conflicting files:

while [ : ]; do echo y; done | sudo pacman -Syu | grep 'exists in filesystem$' | cut -f 2- -d ' ' | sed 's/ exists in filesystem$//g'

UPDATE: I just remembered, Arch doesn't come with sudo, so you may have to run pacman as root though some other means, such as replacing the sudo command with: su -c 'pacman -Syu'. (IDK if Manjaro comes with sudo, but since it's Arch-based, I suspect it doesn't.)

You can use the output of the above to make a backup copy of the conflicting files (perhaps placing them into a tarball). Said list can also be used to automatically delete these files. Here's a nice script you can use to backup and delete the files in one go:

FILES="$(while [ : ]; do echo y; done | pacman -Syu | grep 'exists in filesystem$' | cut -f 2- -d ' ' | sed 's/ exists in filesystem$//g')"
echo "$FILES" | xargs -0 -d \\n -s 9999999999 tar -c -a -f /backup-broken-files.tar || exit
echo "$FILES" | xargs -0 -d \\n -s 9999999999 rm
echo "Backed up and removed conflicting application files."

I should warn you: I used to have Arch, until recently when I switched to Fedora (mostly out of curiosity). That said, since I no longer have Arch, I can't test this script, so use it at your own risk. Also, for this script to work, you will (of course) need to run it AS ROOT.

If you wish to apply compression to the tarball that will be made, just add an appropriate extension - such as .xz, .gz, or .bz2 - to the end of the filename, and tar will automatically use the appropriate compression (thanks to the -a argument).

Hopefully, someone will know a safer way to fix this issue (perhaps making pacman think these files are *already* owned by the packages Kzqai is trying to install/update). Perhaps you should wait for better answers before proceeding.

PS: You'll probably get a warning from xargs saying "value x for -s option should be <= y", where "x" and "y" are numbers. Don't worry, you can safely ignore this warning.

  • With the script after turning it into a ./repair.sh I was able to remove the files and get updating to continue! Well done. – Kzqai Apr 23 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.