0

I was running a full system update. Said update failed abruptly, with the last package modified seemingly being the removal of glibc. Now, nothing works. System built-ins such as cd still work, but on issuance of any other command, an error of the following form results:

bash: /usr/bin/COMMAND: No such file or directory

With some commands causing this error instead:

bash: /usr/bin/COMMAND: /bin/bash: bad interpreter: No such file or directory

I do not know how to proceed. I am scared to shut my computer down or to log out or to close my open terminals. I am using i3 and all keybindings for switching workspaces and the like still function normally, save for my bindings to open a new terminal or the like.

Is there a way for me to undo this package removal? Is that what caused this issue?

6

This is documented on the pacman page of the wiki:

In the case that pacman crashes with a "database write" error while removing packages, and reinstalling or upgrading packages fails thereafter, do the following:

  1. Boot using the Arch installation media. Preferably use a recent media so that the pacman version matches/is newer than the system.
  2. Mount the system's root filesystem, e.g. mount /dev/sdaX /mnt as root, and check the mount has sufficient space with df -h
  3. Mount the proc, sys and dev filesystems as well: mount -t proc proc /mnt/proc; mount --rbind /sys /mnt/sys; mount --rbind /dev /mnt/dev
  4. If the system uses default database and directory locations, you can now update the system's pacman database and upgrade it via pacman --sysroot /mnt -Syyu as root.
  5. After the upgrade, one way to double-check for not upgraded but still broken packages: find /mnt/usr/lib -size 0
  6. Followed by a re-install of any still broken package via pacman --sysroot /mnt -S package.
  • Solved. Thanks. For what it's worth, I had to run pacman --root=/mnt instead of pacman --sysroot /mnt. For some reason the option you recommended couldn't resolve the mirrors. – Riley Scott Jacob Nov 30 '18 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.