How to fix error code #2 when updating and upgrading on the raspbian OS?


I get this error when I'm trying to update and upgrade:

dpkg: unrecoverable fatal error, aborting: files list file for package `dconf-gsettings-backend:armhf' contains empty file name

I have tried apt-get -f to no avail. Can you help me?

Here is complete error that I receive

dpkg: unrecoverable fatal error, aborting:
files list file for package `dconf-gsettings-backend:armhf' contains empty filename
error code (2)
  • Welcome to SE. I recommend that you edit your answer to make it more readable. Also, for all parts that can be considered code, put it in backquotes like this. That will make it easier for us to see the actual errors and what you typed into the terminal. – xxmbabanexx Apr 3 '13 at 14:25
  • Also, what did you type originally? apt-get upgrade? Where you trying to update the OS, firmware, or something else entirely? – xxmbabanexx Apr 3 '13 at 14:27
  • Have you solved your problem? If so, please mark the answer that helped you, or if you solved it on your own, create a self-answer and mark it as such. We are trying to get the site Q:A ratio up and marking answers is what does that. If you resolved it and mark then people in the future will be able to profit from what you did and it helps move the site closer to graduation. Thanks! – RPiAwesomeness Mar 23 '14 at 16:45
  1. From what I can gather, you did not run as a super user. Instead of your normal commands, try typing these lines into the terminal:

    sudo apt-get update
    sudo apt-get upgrade
  2. If you are still having errors, I recommend seeing this Question. Also, try to google your question and see this question on the official forums..

| improve this answer | |

Try using the following script:

dpkg -c full-path-to-debfile | awk '{if ($6 == "./"){ print "/."; } \
else if (substr($6, length($6), 1) == "/") \
{print substr($6, 2, length($6) - 2); } \
else { print substr($6, 2, length($6) - 1);}}' \
> /var/lib/dpkg/info/packagename.list
| improve this answer | |
  • 2
    Good script - bad explanation. @Łukasz Koniecki please explain your code with comments or something similar. – xxmbabanexx Apr 5 '13 at 18:11

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.