Ubuntu在apt update时报gpg错误
今天安装caddy的时候,用apt-get update更新报错了

错误信息1

【Error】couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

解决

sudo chown _apt /var/lib/update-notifier/package-data-downloads/partial/

错误信息2

Err:1 https://dl.cloudsmith.io/public/caddy/testing/deb/debian any-version InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABA1F9B8875A6661

解决

**报这个错误主要是签名出错。 **
sudo gpg --keyserver keyserver.ubuntu.com --recv ABA1F9B8875A6661


最后修改于 2022-07-30