Pamac error: Failed to prepare transaction: invalid or corrupted package

As I am trying to update my system, pamac gives me the following error:

pamac update                                                                                                                                                                                                                    
Preparing..
Synchronizing package databases...
Warning: pygtk: local (2.24.0-16) is newer than chaotic-aur (2.24.0-12)
Resolving dependencies...
Checking inter-conflicts...
Warning: could not fully load metadata for package ghostscript-9.55.0-3
Error: Failed to prepare transaction: invalid or corrupted package

I am using stable DE
Here is the information about my system:

inxi --admin --verbosity=7 --filter --no-host --width                                                                                                                                                                   ✔  16s  
System:
  Kernel: 5.15.21-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=e980b863-ca1f-4e22-bb6b-665a19ddff2d rw quiet apparmor=1
    security=apparmor resume=UUID=3a5c48ea-fa12-4147-b57e-4dbdb9d07104
    udev.log_priority=3
  Desktop: GNOME 41.3 tk: GTK 3.24.31 wm: gnome-shell dm: GDM 41.3
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Timi product: TM1701 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Timi model: TM1701 v: MP serial: <superuser required> UEFI: INSYDE
    v: XMAKB5R0P0502 date: 10/13/2017
Battery:
  ID-1: BAT0 charge: 21.5 Wh (52.1%) condition: 41.3/60.0 Wh (68.8%)
    volts: 7.5 min: 7.6 model: SUNWODA R15B01W type: Li-ion serial: <filter>
    status: Discharging
Memory:
  RAM: total: 7.65 GiB used: 4.89 GiB (64.0%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Coffee Lake
    family: 6 model-id: 0x8E (142) stepping: 0xA (10) microcode: 0xEA
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 727 high: 800 min/max: 400/4000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 800 3: 703 4: 703
    5: 714 6: 700 7: 700 8: 700 bogomips: 32012
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon
    art avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid
    cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est
    f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window
    hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm
    lm mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae
    pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti
    pts rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2
    sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust
    tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt
    xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Xiaomi driver: i915 v: kernel
    bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300
  Device-2: NVIDIA GP108M [GeForce MX150] vendor: Xiaomi Mi Notebook Pro
    driver: nvidia v: 510.47.03 alternate: nouveau,nvidia_drm bus-ID: 01:00.0
    chip-ID: 10de:1d12 class-ID: 0302
  Device-3: Chicony XiaoMi USB 2.0 Webcam type: USB driver: uvcvideo
    bus-ID: 1-6:3 chip-ID: 04f2:b59a class-ID: 0e02
  Display: x11 server: X.Org 1.21.1.3 compositor: gnome-shell driver:
    loaded: modesetting,nvidia unloaded: nouveau alternate: fbdev,nv,vesa
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
    s-diag: 582mm (22.9")
  Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142
    size: 344x194mm (13.5x7.6") diag: 395mm (15.5")
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.3.5
    direct render: Yes
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Xiaomi
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3
    chip-ID: 8086:9d71 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.21-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.45 running: yes
Network:
  Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel
    bus-ID: 03:00.0 chip-ID: 8086:24fd class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  IF-ID-1: docker0 state: down mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 1-5:2 chip-ID: 8087:0a2b class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 3 state: up address: <filter>
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 704.24 GiB used: 310.47 GiB (44.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SanDisk model: Extreme Pro 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 101200RL temp: 44.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:4 vendor: Samsung
    model: MZVLW256HEHP-00000 size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: CXB7401Q temp: 28.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 456.66 GiB size: 448.5 GiB (98.21%)
    used: 309.38 GiB (69.0%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: N/A uuid: e980b863-ca1f-4e22-bb6b-665a19ddff2d
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 316 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A
    uuid: 592C-3652
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.8 GiB used: 1.09 GiB (12.4%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3 label: N/A
    uuid: 3a5c48ea-fa12-4147-b57e-4dbdb9d07104
Unmounted:
  ID-1: /dev/nvme1n1p1 maj-min: 259:5 size: 499 MiB fs: ntfs label: N/A
    uuid: A68E15988E15625B
  ID-2: /dev/nvme1n1p2 maj-min: 259:6 size: 100 MiB fs: vfat label: N/A
    uuid: A27D-5F71
  ID-3: /dev/nvme1n1p3 maj-min: 259:7 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-4: /dev/nvme1n1p4 maj-min: 259:8 size: 237.87 GiB fs: ntfs label: N/A
    uuid: 40AE7F22AE7F0FA0
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-5:2 info: Intel Bluetooth wireless interface type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 8087:0a2b class-ID: e001
  Device-2: 1-6:3 info: Chicony XiaoMi USB 2.0 Webcam type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 04f2:b59a class-ID: 0e02
  Device-3: 1-7:4 info: Realtek RTS5129 Card Reader Controller
    type: <vendor specific> driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc
    interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 0bda:0129
    class-ID: ff00 serial: <filter>
  Device-4: 1-8:5 info: Elan Micro ELAN:Fingerprint type: <vendor specific>
    driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 04f3:0c1a class-ID: 0000
  Device-5: 1-9:6 info: Areson Corp 2.4G Receiver type: Keyboard,Mouse
    driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 12 Mb/s
    power: 100mA chip-ID: 25a7:fa23 class-ID: 0301
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 39.0 C pch: 32.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 408 Uptime: 1h 10m wakeups: 5 Init: systemd v: 250
  tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: 2347
  pacman: 2271 lib: 515 flatpak: 57 snap: 19 Shell: Zsh v: 5.8 running-in: gjs
  inxi: 3.3.12

What can I do about it?

Disable this first.

OK I did, still doesn’t work:

pamac update                                                                                                                                                                                                     INT ✘  1m 47s  
Preparing...
Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...
Warning: could not fully load metadata for package ghostscript-9.55.0-3
Error: Failed to prepare transaction: invalid or corrupted package

Any other ideas?

you can try this first, it doesn’t harm but maybe it’s this simple fix:

sudo pacman -Scc
sudo pacman-mirrors -f5
sudo pacman -Syyu

Did not help, but thanks :slight_smile:

please give us some more information, everything else is a guess:

:+1: Welcome to Manjaro! :+1:

  1. Please read this:
    [HowTo] Provide System Information
    and press the three dots below your post and press the :pencil2: to give us more information so we can see what’s really going on.
    Now we know the symptom of the disease, but we need some more probing to know where the origin lies… :grin:
  2. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information for us to be able to help you. (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
    Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.

:+1:

also please tell us is this stable/unstable DE ?

sudo pacman-mirrors -G

1 Like

Thanks a lot, I tried to include everything in my initial question

also please tell us is this stable/unstable DE ?

sudo pacman-mirrors -G

I was adding that just as you replied :slight_smile:

did you install applications from aur ? they caused a lot of trouble with the latest update.
next question, what about changing the de to unstable, that will force a complete update to unstable and after changing back to stable and redo the update ? personal i would try this hard way to override the actual settings. be aware to uninstall the aur packages first.

I have actually installed quite some applications from AUR and chaotic AUR.

in my opinion this is the main problem. as philm already explained with the actual update all aur packages have to be updated to python3.9 etc… from what i read it’s the best way to uninstall the aur packages, run the update, reinstall the aur-packages.

I have uninstalled all AUR packages, I still get the same error message:

pamac update
Preparing...
Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...
Warning: could not fully load metadata for package ghostscript-9.55.0-3
Error: Failed to prepare transaction: invalid or corrupted package

uninstall ghostscript-package also and try again. you can reinstall it anytimes, so no loss. it’s a try worth, but if the problems still exist i would recommend the hard-way to define a different branch (unstable) and force the update to change to a different branch. after this you can change the branch back to stable and redo the process. that might sound a little bit oversized but sometimes ar(s)ch needs the hammer-method

i am unable to remove it:

sudo pacman -R ghostscript                                                                                                                                                                                                   
error: could not open file /var/lib/pacman/local/ghostscript-9.55.0-3/desc: No such file or directory
warning: could not fully load metadata for package ghostscript-9.55.0-3
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing ghostscript breaks dependency 'ghostscript' required by cups-pdf
:: removing ghostscript breaks dependency 'ghostscript' required by graphviz
:: removing ghostscript breaks dependency 'ghostscript' required by hplip
:: removing ghostscript breaks dependency 'ghostscript>=9.00' required by libspectre
:: removing ghostscript breaks dependency 'ghostscript' required by manjaro-printer
:: removing ghostscript breaks dependency 'ghostscript' required by splix

as already suggested, i would use the hard way.

sudo pacman-mirrors --api --set unstable
sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu

https://wiki.manjaro.org/index.php/Switching_Branches

there seems to be the problem
it could help to just reinstall ghostscript from local cache or download it separately and install it via sudo pacman -U /path/to/file

…but the local cache is already gone. I guess, since you probably ran
sudo pacman -Scc
earlier …

I’d rather try this first before switching branches and thereby replace most software …

I am not quite sure where to download it from, I just found the newer version online 9.55.0-4
which did not help

sudo pacman -U ghostscript-9.55.0-4-x86_64.pkg.tar.zst                                                                                                                                               
loading packages...
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/ghostscript-9.55.0-3/desc: No such file or directory
warning: could not fully load metadata for package ghostscript-9.55.0-3
error: failed to prepare transaction (invalid or corrupted package)

I have read about similar problems and I believe the solution for at least one case was
to actually create the missing file (as an empty file):
sudo touch /var/lib/pacman/local/ghostscript-9.55.0-3/desc

then try installing the ghostscript package you downloaded again

If you haven’t found these problems/solutions … just try it.
It can’t hurt - it’s already broken :wink:

1 Like