Pacman: /var/lib/pacman/local/libxdmcp-1.1.3-2/desc missing

Could anyone explain what happened? My laptop is still not stable enough and something might have been lost, but I’m not sure what and how to fix it. While using pacman, I’m getting the error message:

$ 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...
resolving dependencies...
error: could not open file /var/lib/pacman/local/libxdmcp-1.1.3-2/desc: No such file or directory
looking for conflicting packages...

Packages (2) vim-8.2.0510-2  vim-runtime-8.2.0510-2

Total Download Size:    7.86 MiB
Total Installed Size:  32.84 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n]

Installation goes well anyway, but I don’t like seeing errors.

Looks like a corrupted pacman database, try reinstalling the offending package:

pacman -Syu libxdmcp

Another puzzle:

pacman -Syu libxdmcp
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
warning: libxdmcp-1.1.3-2 is up to date -- reinstalling
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/libxdmcp-1.1.3-2/desc: No such file or directory
warning: could not fully load metadata for package libxdmcp-1.1.3-2
error: failed to prepare transaction (invalid or corrupted package)

Try copying a desc file from another package in /var/lib/pacman/local/ to libxdmcp's directory then reinstall it again.

Good idea. I just touched the file and it seems to have helped. Thanks!

No, not really. It complains about another missing path.

How so?

Next one was /var/lib/pacman/local/libxdmcp-1.1.3-2/files. After touching it, I tried to install over existing package, but it fails due to files already existing.

I’d just remove it and install again, but many other things depend on it.

I really need to see the exact, full error message.

sudo pacman -S libxdmcp
warning: libxdmcp-1.1.3-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) libxdmcp-1.1.3-2

Total Installed Size:  0.13 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                  [##################################] 100%
(1/1) checking package integrity                                [##################################] 100%
(1/1) loading package files                                     [##################################] 100%
(1/1) checking for file conflicts                               [##################################] 100%
error: failed to commit transaction (conflicting files)
libxdmcp: /usr/include/X11/Xdmcp.h exists in filesystem
libxdmcp: /usr/lib/libXdmcp.so exists in filesystem
libxdmcp: /usr/lib/libXdmcp.so.6 exists in filesystem
libxdmcp: /usr/lib/libXdmcp.so.6.0.0 exists in filesystem
libxdmcp: /usr/lib/pkgconfig/xdmcp.pc exists in filesystem
libxdmcp: /usr/share/doc/libXdmcp/xdmcp.xml exists in filesystem
libxdmcp: /usr/share/licenses/libxdmcp/COPYING exists in filesystem
Errors occurred, no packages were upgraded.

https://wiki.archlinux.org/index.php/pacman#"Failed_to_commit_transaction_(conflicting_files)"_error

1 Like

Yeah, I needed chroot, as renaming these files killed the system. However, it seems to be fixed now. Thanks for help!