admin avatar

ubuntu系统出现user '_apt'. - pkgAcquire::Run (13: Permission denied)的结局方法

🕧 by admin

执行apt-get source nginx出现了以下错误

1
2
3
4
5
Fetched 1,237 kB in 0s (12.0 MB/s)
dpkg-source: info: extracting nginx in nginx-1.23.4
dpkg-source: info: unpacking nginx_1.23.4.orig.tar.gz
dpkg-source: info: unpacking nginx_1.23.4-1~jammy.debian.tar.xz
W: Download is performed unsandboxed as root as file 'nginx_1.23.4-1~jammy.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

解决方法,修复相关目录权限即可

1
2
3
4
chown -Rv _apt:root /var/cache/apt/archives/partial/
ownership of '/var/cache/apt/archives/partial/' retained as _apt:root
chmod -Rv 700 /var/cache/apt/archives/partial/
mode of '/var/cache/apt/archives/partial/' retained as 0700 (rwx------)

💘 相关文章

写一条评论