0

I flashed the latest version of raspbian-lite to an SD card and booted my Model B from it. I changed the hostname and other config settings in raspi-config, then reboted and tried to run sudo apt update && sudo apt upgrade which failed:

Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: error: fgets gave an empty string from '/var/lib/dpkg/triggers/File'
E: Sub-process /usr/bin/dpkg returned an error code (2)

I noticed this post, which instructed me to run sudo apt-get clean to resolve the issue, but the problem still persists. What can I do to make aptitude function properly?

  • since you've only just flashed it - try starting from the beginning again - perhaps something went wrong with the flashing, or even the download! first though, what are the contents of /var/lib/dpkg/triggers/File – Jaromanda X Aug 20 '18 at 3:07
  • 1
    Flash the image and first do nothing else then sudo apt update && sudo apt full-upgrade, reboot. With Raspbian Stretch 2018-06-27 you will have a kernel and firmware update then. – Ingo Aug 20 '18 at 11:12
  • Okay, I'll try that now, @Ingo – ifconfig Aug 20 '18 at 23:46
  • Nope, same error, @Ingo – ifconfig Aug 21 '18 at 6:23

Your Answer

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

Browse other questions tagged or ask your own question.