如何修复 etckeeper 或卸载它以便 apt 安装/删除新软件包?

如何修复 etckeeper 或卸载它以便 apt 安装/删除新软件包?

操作系统:内置 Debian Buster 10.10长沙

我正在尝试安装一个新的软件包(我尝试了不同的软件包),并且 apt(和 DPkg)抱怨以下错误消息:

/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

我决定卸载 etckeeper 并收到完全相同的错误消息。

我的谷歌搜索/搜索似乎缺乏。我的推理是问题出在 etckeeper 上,尽管我可能是错的。

答案1

编辑:更新更多信息这里。我重命名了以下目录并重新创建了它们:

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

它允许我安装新的软件包。

如果你想一起摆脱 etckeeper:

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  

相关内容