0

OS: Debian Buster 10.10 inside lxc

I am attempting to install a new package (I tried different packages) and apt (and DPkg) is complaining with the following error message(s):

/etc/etckeeper/pre-install.d/README: 1: /etc/etckeeper/pre-install.d/README: Files: not found
/etc/etckeeper/pre-install.d/README: 2: /etc/etckeeper/pre-install.d/README: etc.: not found
/etc/etckeeper/pre-install.d/README: 3: /etc/etckeeper/pre-install.d/README: uncommitted: not found
E: Problem executing scripts DPkg::Pre-Invoke 'if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi'
E: Sub-process returned an error code

I decided to unstall etckeeper and got the exact same error message.

My googling / searching seems to be lacking. My reasoning is the problem lies with etckeeper, although I could be wrong.

2

1 Answer 1

0

edit: update with more information found from here. I renamed the following directories and recreated them:

/etc/etckeeper/  
    pre-install.d
    post-install.d  
    unclean.d 

And it allowed me to install new packages.

If you want to get rid of etckeeper all together:

rm -rf /var/lib/dpkg/info/etckeeper.*  
rm -rf /usr/share/etckeeper  
rm -rf /etc/default/etckeeper  
rm -rf /etc/init.d/etckeeper  
apt-get purge etckeeper  
mv /usr/bin/etckeeper /usr/bin/etckeeper.bak  
mv /etc/etckeeper/ /etc/etckeeper.bak  

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.