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.

  • Given where you're at, I would start again (and maybe have a coffee ready for the 'pacman -Syu' stage)
    – mcalex
    Jun 23 '14 at 3:09
  • I did start again and everything is good now. Too bad you didn't comment sooner, a coffee would have prevented the verbal profanity that ensued ;)
    – samrap
    Jun 23 '14 at 3:13
  • Oh and I also found out that the blank screen was just the screensaver so I caused the problem by unplugging the power source :-) you can imagine the frustration at that point
    – samrap
    Jun 23 '14 at 3:14
  • I was going to suggest that might be the problem, except the light should still have been on which you said wasn't the case.
    – mcalex
    Jun 23 '14 at 3:17
  • Well the power light was on, but the activity light wasn't. I'm pretty sure my current power cord is less than 5V so who knows what really happened. Either way I'm stoked to have it up and running now
    – samrap
    Jun 23 '14 at 3:19

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.)

  • Oh if only you answered sooner, I repartitioned and it took forever. Thanks for the explanation!
    – samrap
    Jun 23 '14 at 5:06
  • That's a bit odd; normally typing stuff into fdisk is the longest part of repartitioning -- the rest takes seconds.
    – user1686
    Jun 23 '14 at 5:09
  • Well originally the SD had NOOBS on it because I didn't feel like spending 30 minutes downloading Arch. I plugged it into my computer and wiped everything, then reformatted it. That's why it took so long.
    – samrap
    Jun 23 '14 at 5:19

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.