Python-cairo error: failed to commit transaction (conflicting files)

Hi all,
I’ve got some past trauma from broken systems related to python update issues :pensive:
So any help would be appreciated :saluting_face:

Presently,
Updates are failing w/ garuda-update

Packages (18) dxvk-mingw-git-2.0.r28.g522909b1-1  glib2-2.74.3-1  lib32-glib2-2.74.3-1
linux-zen-6.0.11.zen1-1  linux-zen-headers-6.0.11.zen1-1  mujs-1.3.2-1  python-cairo-1.23.0-2
python-wxpython-1:4.2.0-3  ruby-english-0.7.1-5  ruby-io-wait-0.2.3-4  ruby-ipaddr-1.2.4-3
ruby-logger-1.5.1-3  ruby-mutex_m-0.1.1-3  sqlite-3.40.0-2  sweet-theme-full-git-r293.a73fd26-1
usbutils-015-2  vivaldi-5.5.2805.50-1  vlc-3.0.18-1

Total Installed Size:  847.05 MiB
Net Upgrade Size:       -0.07 MiB

:: Proceed with installation? [Y/n]
(18/18) checking keys in keyring                                   [------------------------------------] 100%
(18/18) checking package integrity                                 [------------------------------------] 100%
(18/18) loading package files                                      [------------------------------------] 100%
(18/18) checking for file conflicts                                [------------------------------------] 100%
error: failed to commit transaction (conflicting files)
python-cairo: /usr/lib/python3.10/site-packages/cairo/__pycache__/__init__.cpython-310.pyc exists in filesystem
Errors occurred, no packages were upgraded.

First off, I’ve already read below

And according to that post, I’ve tried the following:

λ pacman -Qo /usr/lib/python3.10/site-packages/cairo/__pycache__/__init__.cpython-310.pyc
error: No package owns /usr/lib/python3.10/site-packages/cairo/__pycache__/__init__.cpython-310.pyc

Please share best options for next steps.
Thanks! :smiling_face_with_tear:

System:
Kernel: 6.0.10-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=6d358332-1121-46d2-a2c5-bd235a269b18 rw rootflags=subvol=@
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=c06ef7ff-534a-46d8-a0e0-a3052b377e5f loglevel=3
Desktop: KDE Plasma v: 5.26.4 tk: Qt v: 5.15.7 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 20X7005AUS v: ThinkPad L15 Gen 2a
serial: <superuser required> Chassis: type: 10 serial: <superuser required>
Mobo: LENOVO model: 20X7005AUS serial: <superuser required> UEFI: LENOVO
v: R1KET36W (1.21 ) date: 11/25/2021
Battery:
ID-1: BAT0 charge: 41.6 Wh (98.6%) condition: 42.2/45.7 Wh (92.2%)
volts: 12.3 min: 11.1 model: SMP LNV-5B10W13896 type: Li-poly
serial: <filter> status: not charging cycles: 173
CPU:
Info: model: AMD Ryzen 7 PRO 5850U with Radeon Graphics bits: 64
type: MT MCP arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
microcode: 0xA50000C
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 16 MiB desc: 1x16 MiB
Speed (MHz): avg: 1761 high: 1987 min/max: 1600/4505 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 1987 2: 1800
3: 1900 4: 1900 5: 1900 6: 1396 7: 1516 8: 1900 9: 1900 10: 1595 11: 1900
12: 1397 13: 1900 14: 1900 15: 1900 16: 1398 bogomips: 60690
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: mmio_stale_data status: Not affected
Type: retbleed status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
sanitization
Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5.1 code: Vega-2
process: TSMC n7 (7nm) built: 2018-21 pcie: gen: 3 speed: 8 GT/s lanes: 16
link-max: gen: 4 speed: 16 GT/s ports: active: HDMI-A-1,eDP-1
empty: DP-1,DP-2 bus-ID: 07:00.0 chip-ID: 1002:1638 class-ID: 0300
temp: 43.0 C
Device-2: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 1-2:2
chip-ID: 5986:212b class-ID: 0e02
Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.5
compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting
alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x2160 s-dpi: 96 s-size: 506x570mm (19.92x22.44")
s-diag: 762mm (30.01")
Monitor-1: HDMI-A-1 mapped: HDMI-A-0 pos: top model: AAA built: 2015
res: 1920x1080 hz: 60 dpi: 85 size: 575x323mm (22.64x12.72") modes:
max: 1920x1080 min: 720x400
Monitor-2: eDP-1 mapped: eDP pos: primary,bottom
model: AU Optronics 0x2e8d built: 2019 res: 1920x1080 hz: 60 dpi: 142
gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9
modes: max: 1920x1080 min: 640x480
API: OpenGL v: 4.6 Mesa 22.2.3 renderer: AMD Radeon Graphics (renoir LLVM
14.0.6 DRM 3.48 6.0.10-zen2-1-zen) direct render: Yes
Audio:
Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
link-max: gen: 4 speed: 16 GT/s bus-ID: 07:00.1 chip-ID: 1002:1637
class-ID: 0403
Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x,
snd_acp_pci, snd_rpl_pci_acp6x, snd_sof_amd_renoir pcie: gen: 3
speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 07:00.5
chip-ID: 1022:15e2 class-ID: 0480
Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
speed: 16 GT/s bus-ID: 07:00.6 chip-ID: 1022:15e3 class-ID: 0403
Sound API: ALSA v: k6.0.10-zen2-1-zen running: yes
Sound Server-1: PulseAudio v: 16.1 running: no
Sound Server-2: PipeWire v: 0.3.61 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp2s0f0 state: down mac: <filter>
Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
vendor: Lenovo driver: rtw89_8852ae v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8852 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
IF-ID-1: anbox0 state: down mac: <filter>
IF-ID-2: docker0 state: down mac: <filter>
Bluetooth:
Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
bus-ID: 5-4:3 chip-ID: 0bda:4852 class-ID: e001 serial: <filter>
Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter>
Drives:
Local Storage: total: 476.94 GiB used: 228.94 GiB (48.0%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFS512GDE9X081N
size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 type: SSD serial: <filter> rev: 41730C20 temp: 41.9 C scheme: GPT
Partition:
ID-1: / raw-size: 97.66 GiB size: 97.66 GiB (100.00%)
used: 29.22 GiB (29.9%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p3
maj-min: 259:3
ID-2: /boot/efi raw-size: 1000 MiB size: 998 MiB (99.80%)
used: 596 KiB (0.1%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p1
maj-min: 259:1
ID-3: /home raw-size: 358.77 GiB size: 358.77 GiB (100.00%)
used: 199.72 GiB (55.7%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p4
maj-min: 259:4
ID-4: /var/log raw-size: 97.66 GiB size: 97.66 GiB (100.00%)
used: 29.22 GiB (29.9%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p3
maj-min: 259:3
ID-5: /var/tmp raw-size: 97.66 GiB size: 97.66 GiB (100.00%)
used: 29.22 GiB (29.9%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p3
maj-min: 259:3
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 14.46 GiB used: 768 KiB (0.0%) priority: 100
dev: /dev/zram0
ID-2: swap-2 type: partition size: 19.53 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p2 maj-min: 259:2
Sensors:
System Temperatures: cpu: 51.0 C mobo: N/A gpu: amdgpu temp: 44.0 C
Fan Speeds (RPM): fan-1: 3179
Info:
Processes: 385 Uptime: 19m wakeups: 2 Memory: 14.46 GiB
used: 5.26 GiB (36.4%) Init: systemd v: 252 default: graphical
tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pm: pacman
pkgs: 2135 libs: 575 tools: gnome-software,octopi,pamac,paru Shell: fish
v: 3.5.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.23
Garuda (2.6.10-1):
System install date:     2022-04-06
Last full system update: 2022-12-03
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Snapper
Failed units:            systemd-networkd-wait-online.service

I'd continue with the tutorial.
If no package is identified you can delete the file, e.g. rm /path/to/file (or move it to a backup location, e.g. mv /path/to/file /path/to/file.backup

3 Likes
sudo pacman -Syu --overwrite '*'

:smiley:

4 Likes

Which is the same basically in this case.
But I don't dare using overwrite anymore :wink:

2 Likes

Thanks to snapper, I've become braver in that regard.

2 Likes

When I ran into this I tried updating via pamac and it renamed the file with ".old" for me and now it's up to date.

For information, .pyc files are just cached python bytecode, it’s safe to ignore and proceed as already advised (with --overwrite '*').

In this case, the owner is not found because those files are not included in the package but generated on the fly.

fish❯ pacman -Ql python-cairo
python-cairo /usr/
python-cairo /usr/include/
python-cairo /usr/include/pycairo/
python-cairo /usr/include/pycairo/py3cairo.h
python-cairo /usr/lib/
python-cairo /usr/lib/pkgconfig/
python-cairo /usr/lib/pkgconfig/py3cairo.pc
python-cairo /usr/lib/python3.10/
python-cairo /usr/lib/python3.10/site-packages/
python-cairo /usr/lib/python3.10/site-packages/cairo/
python-cairo /usr/lib/python3.10/site-packages/cairo/__init__.py   # <== this is where it comes from
python-cairo /usr/lib/python3.10/site-packages/cairo/__init__.pyi
python-cairo /usr/lib/python3.10/site-packages/cairo/_cairo.cpython-310-x86_64-linux-gnu.so
python-cairo /usr/lib/python3.10/site-packages/cairo/include/
python-cairo /usr/lib/python3.10/site-packages/cairo/include/py3cairo.h
python-cairo /usr/lib/python3.10/site-packages/cairo/py.typed
python-cairo /usr/lib/python3.10/site-packages/pycairo-1.23.0.egg-info

In other cases, an unexpected file conflict may indicate something worth looking into.

3 Likes

Thanks that's what I did and it solve upgrade process :+1:

1 Like

Thanks, this did the trick :metal:

1 Like

Thanks SGS worked like a charm.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

garuda-update can now handle these common python conflicts completely automatically and only does so when it determines it to be appropriate. It won't issue --overwrite commands on stuff it's not sure about.

Pssst @SGS you can tell garuda-update to include custom parameters using the syntax garuda-update -- [param], for example garuda-update -- --overwrite '*'

9 Likes

I was wondering how to add the custom parameters to garuda update but used pacman to fix it :smiley:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.