When I recently updated my laptop as well, python cairo was updated without any problems.
For me, the āstandard procedureā for these kinds of situation is this:
- Check which package owns conflicting file:
pacman -Qo <conflicting_file>
- If a package owns that file, file a bug report. Otherwise, simply rename the file (just in case you need a copy of it) and then perform the update again.
thanks!!
Did have the problem. Starting doing a general search to see if it was a known issue, and this forum was one of the very first hits I get. You guys are just on this.
I started updating the packages yesterday morning. At first, I only found this https://forum.archlabslinux.com/t/solved-update-failed-error-python-cairo/6961 as a solution, and the meaningless Arch forum post.
same problem here python-cairo blocked all package upgrades⦠can confirm your command fixed it. package upgrades installed fine.
This forum is simply the best thing about EOS. I am 66 years old, and started using Linux last year. Distro hopped until I heard about this forum. Leaning more and more by using EOS. I had the update issue this morning and found the fix in less the 30 seconds.
Cheers
Thank you!
I got this error, come to the forum for help and seeing this pinned, amazing
https://wiki.archlinux.org/title/Pacman ⦠)%22_error
3.1 āFailed to commit transaction (conflicting files)ā error
If you see the following error: [1]
error: could not prepare transaction
error: failed to commit transaction (conflicting files)
package: /path/to/file exists in filesystem
Errors occurred, no packages were upgraded.
This is happening because pacman has detected a file conflict, and by design, will not overwrite files for you. This is by design, not a flaw.
The problem is usually trivial to solve. A safe way is to first check if another package owns the file (pacman -Qo _/path/to/file_
). If the file is owned by another package, file a bug report. If the file is not owned by another package, rename the file which āexists in filesystemā and re-issue the update command. If all goes well, the file may then be removed.
If you had installed a program manually without using pacman, for example through make install
, you have to remove/uninstall this program with all of its files. See also Pacman tips#Identify files not owned by any package.
Every installed package provides a /var/lib/pacman/local/_package-version_/files
file that contains metadata about this package. If this file gets corrupted, is empty or goes missing, it results in file exists in filesystem
errors when trying to update the package. Such an error usually concerns only one package. Instead of manually renaming and later removing all the files that belong to the package in question, you may explicitly run pacman -S --overwrite _glob_ _package_
to force pacman to overwrite files that match _glob_
.
Warning: Generally avoid using the --overwrite
switch. See System maintenance#Avoid certain pacman commands.
Interesting. I got that error and didnāt know --overwrite
So, I simply deleted /usr/lib/python3.10/site-packages/cairo/__pycache__/
and then update went fine.
You can also do that in cases when the file can be temporarily removed safely.
Definitely worked. Thanks!
It seems the culprit is needed by āmeldā:
[xx@hp2000pc ~]$ sudo pacman -Ss python-cairo
extra/python-cairo 1.23.0-2 [installed: 1.23.0-1]
Python bindings for the cairo graphics library
community/python-cairocffi 1.4.0-1
cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of Python bindings and
object-oriented API for cairo.
community/python-cairosvg 2.5.2-4
SVG converter based on Cairo. It can export SVG files to PDF, PostScript and PNG files
[xx@hp2000pc ~]$ sudo pacman -Rs python-cairo
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python-cairo breaks dependency 'python-cairo' required by meld
So I uninstalled āmeldā, then the upgrade went down as expected.
IIRC āmeldā was pre-installed from ISO; I did not go online to install EndeavourOS. I havenāt used it because I donāt know what itās for LOL.
You donāt really have to uninstall python-cairo
to solve thisānot the best practice, in my opinion. Next time thereās a conflicting file during an update, just run pacman -Qo <file_Name>
to see which package owns the file. If no packages own the file, just rename the file (just in case you need a copy of it) and then run the update again.
You could use the --overwrite
flag with pacman
, but this is discouraged by the arch wiki and for good reason.
You are extremely lucky that the file wasnāt a part of some other package. Next time, before you delete anything, check with pacman -Qo <file_name>
first.
But in this case, itās okay because the directory you deleted is a __pycache__
directory, which contains bytecodes that are generated by pythonāthose bytecodes could be generated again, so thereās no problem there.
Actually, I couldnāt imagine that the __pycache__
directory could be a part of another package. Very unlikely.
And yes, I did check before deleting it.