当我尝试像这样的命令时sudo apt-get autoclean
,或者sudo apt-get clean
我收到错误E: Clean of / is not supported
。
$ sudo apt-get autoclean
Reading Package Lists ... Done
Building the dependency tree
Reading status information ... Done
E: Clean of / is not supported
$ apt-config dump | fgrep Dir::Cache
Dir::Cache "";
Dir::Cache::archives "";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
我正在使用 Linux Mint
$ cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18
DISTRIB_CODENAME=sarah
DISTRIB_DESCRIPTION="Linux Mint 18 Sarah"
有什么建议可以解决这个问题吗?
答案1
您已修改您的apt
配置:
Dir::Cache "";
Dir::Cache::archives "";
以下是正确的值:
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
由于在toapt
前面添加了一个/
to Dir::Cache
,因此它拒绝清理,/
如错误消息中所报告的那样。修复您的配置/etc/apt/apt.conf
和/或/etc/apt/apt.conf.d/*