command line - Arch Linux pacman error while loading shared libraries on Raspberry Pi

07
2014-07
  • samrap

    I know there are tons of forum posts on this, but I have found nothing on my exact problem. My Raspberry Pi just arrived and I installed Arch Linux and booted up, changed the timezone and password, just basic setup stuff. Then I initialized pacman using pacman-key --init and it initialized extremely quickly. I then used pacman -Syu to get the latest updates for the system. I could tell it would take a while so I went downstairs to let it do its thing and when I came back the ACTIVITY light on my Pi was off and the output screen was black with no command prompt or anything. My assumption is that somehow my Pi lost power or something, but I am not sure. Some type of error occurred, though, because when I try and run pacman to install anything, I get the following error:

    pacman: error while loading shared libraries: /usr/lib/libgpgme.so.11: file too short
    

    I'm not sure, but I think the power to my Pi may have been interrupted mid-installation. I checked all the root directories like etc and bin and all the files seem to be there, so as far as I know my installation of Arch Linux is still fine...but for some reason pacman doesn't want to work. Any idea of the problem here? This is my first experience with the Linux OS, though I've been using the command line on my UNIX OS-X for almost a year, so I'm not a total noob. Any help would be great.

  • Answers
  • grawity

    The files seem to be there, but that's not the problem – as the error message says, they're "too short", or in other words, most probably empty. (This happens frequently when the power is lost during an upgrade. The file metadata was written first when creating the new file, then when closing the finished file, but only the first write was flushed to disk – the second one got lost due to power loss.)

    The normal way to fix this is to reinstall all affected packages. Since you only have a fresh Arch system, it might be easiest to just wipe and reinstall. (Don't bother repartitioning, though, a find /mnt -delete + pacstrap /mnt base will suffice.)


  • Related Question

    Arch linux selecting packages
  • allenskd

    I'm currently having problems with my arch linux installation, forgot to select a few packages but in the guide they never mention which key do I need to press to select/deselect the packages in the installation screen.

    I used to select them but it's been a long time, I don't remember much anymore =/

    Or, if there is a way to make pacman recognize the cd as a container of packages that'd be great.


  • Related Answers
  • allenskd

    When selecting packages in Arch Linux in the "Select Packages", just press the space bar to select/deselect