/var/cache/apt-show-versions/files:没有此文件或目录

/var/cache/apt-show-versions/files:没有此文件或目录

当我运行时,sudo apt-get update结果是:

can't create /var/cache/apt-show-versions/files: No such file or directory at /usr/bin/apt-show-versions line 196.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
E: Sub-process returned an error code

我该如何解决这个问题?

输出ls -ld /var/cache/apt-show-versions

ls: cannot access /var/cache/apt-show-versions: No such file or directory

答案1

重新安装apt-show-versions

sudo apt-get install --reinstall apt-show-versions

或开始

apt-show-versions -i

解释

该文件夹/var/cache/apt-show-versions可能已被删除。我为什么会这么认为?原因如下:

我已经测试过了

sudo rm -r /var/cache/apt-show-versions

当我开始

sudo apt-get update

我有这个问题

can't create /var/cache/apt-show-versions/files: No such file or directory at /usr/bin/apt-show-versions line 199.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i

和命令

apt-show-versions -i

解决了这个问题。

相关内容