apt update 失败

发布时间 2023-08-11 13:24:29作者: 闹不机米

报错:

E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

解决办法:

apt update

apt remove command-not-found

apt update

apt install command-not-found

apt update

然后他就ok了