0

every apt-get install operation runs in to the following error

dpkg: error: fgets gave an empty string from `/var/lib/dpkg/triggers/File' E: Sub-process /usr/bin/dpkg returned an error code (2)

it is an fresh install (2016-09-23-raspbian-jessie-lite)

can some one help me

  • Did you run sudo apt-get update first? Have you cleared the apt cache and redownloaded the packages? – Steve Robillard Oct 1 '16 at 12:20
  • yes have run apt-get uptate first then i have tried to delete /var/cache/apt and run apt-get update again but no effect – Moggele Oct 1 '16 at 12:25
2

Mount the orginal image file

sudo mount ./2016-09-23-raspbian-jessie-lite.img ../rasp/root -o offset=$((137216*512))

Copy /var/lib/dpkg again to the sdcard of the pi and everything worked.

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.