Pacman won't upgrade due to broken package

I’m trying to do a system upgrade with Pacman, but I keep getting this error:

error: could not open file /var/lib/pacman/local/libgusb-0.3.4-1/desc: No such file or directory
resolving dependencies...
looking for conflicting packages...
warning: could not fully load metadata for package libgusb-0.3.4-1
error: failed to prepare transaction (invalid or corrupted package)

What can I do to fix this?

Just posted this for you :wink:

I would suggest: delete the folder and upgrade again

sudo rm -Rf /var/lib/pacman/local/libgusb-0.3.4-1/

sudo pacman -Syu

Also … if you have touched mirrors in any way or your mirrors are being ranked in the background (such as by pamac-mirrorlist.timer) then make sure to use 2 y’s to refresh db.

sudo pacman -Syyu

Thank you so much! That worked!

How do I upgrade libgusb, though? It’s not showing up as installed in Octopi anymore, and when I try to install it, it gives me these errors:

error: failed to commit transaction (conflicting files)
libgusb: /usr/bin/gusbcmd exists in filesystem
libgusb: /usr/include/gusb-1/gusb.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-autocleanups.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-context-private.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-context.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-device-list.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-device-private.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-device.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-endpoint-private.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-endpoint.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-interface-private.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-interface.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-source.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-util.h exists in filesystem
libgusb: /usr/include/gusb-1/gusb/gusb-version.h exists in filesystem
libgusb: /usr/lib/girepository-1.0/GUsb-1.0.typelib exists in filesystem
libgusb: /usr/lib/libgusb.so exists in filesystem
libgusb: /usr/lib/libgusb.so.2 exists in filesystem
libgusb: /usr/lib/libgusb.so.2.0.10 exists in filesystem
libgusb: /usr/lib/pkgconfig/gusb.pc exists in filesystem
libgusb: /usr/share/gir-1.0/GUsb-1.0.gir exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/faq.html exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/gusb-GUsbContext.html exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/gusb-GUsbDevice.html exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/gusb-GUsbDeviceList.html exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/gusb-gusb-interface.html exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/gusb-gusb-source.html exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/gusb-gusb-version.html exists in filesystem
libgusb: /usr/share/gtk-doc/html/gusb/gusb.devhelp2 exists in filesystem
Errors occurred, no packages were upgraded.

Should I try renaming or removing these files? Is there an easier or better way?

2 Likes

Awesome! It worked! Thank you!

1 Like

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