file /tmp/apt.conf.SUhXie for passing config to apt"/>
Couldn‘t create temporary file /tmp/apt.conf.SUhXie for passing config to apt
apt-get update无法创建临时文件报错
报错内容如下:
Get:1 focal InRelease [265 kB]
Err:1 focal InRelease
Couldn’t create temporary file /tmp/apt.conf.T7lK6i for passing config to apt-key
Get:2 focal-updates InRelease [114 kB]
Err:2 focal-updates InRelease
Couldn’t create temporary file /tmp/apt.conf.wisI5n for passing config to apt-key
Get:3 focal InRelease [7291 B]
Get:4 focal-backports InRelease [108 kB]
Err:4 focal-backports InRelease
Couldn’t create temporary file /tmp/apt.conf.C1cEju for passing config to apt-key
Err:3 focal InRelease
Couldn’t create temporary file /tmp/apt.conf.D2Tv0x for passing config to apt-key
Get:5 focal-security InRelease [114 kB]
Err:5 focal-security InRelease
Couldn’t create temporary file /tmp/apt.conf.raCMvC for passing config to apt-key
Reading package lists…
W: GPG error: focal InRelease: Couldn’t create temporary file /tmp/apt.conf.T7lK6i for passing config to apt-key
E: The repository ‘ focal InRelease’ is not signed.
W: GPG error: focal-updates InRelease: Couldn’t create temporary file /tmp/apt.conf.wisI5n for passing config to apt-key
E: The repository ‘ focal-updates InRelease’ is not signed.
W: GPG error: focal-backports InRelease: Couldn’t create temporary file /tmp/apt.conf.C1cEju for passing config to apt-key
E: The repository ‘ focal-backports InRelease’ is not signed.
W: GPG error: focal InRelease: Couldn’t create temporary file /tmp/apt.conf.D2Tv0x for passing config to apt-key
E: The repository ‘ focal InRelease’ is not signed.
W: GPG error: focal-security InRelease: Couldn’t create temporary file /tmp/apt.conf.raCMvC for passing config to apt-key
E: The repository ‘ focal-security InRelease’ is not signed.
重点是Couldn’t create temporary file /tmp/apt.conf.T7lK6i for passing config to apt-key。
报错的原理可参考这篇博客。
解决方法
在使用apt-get update之前修改/tmp文件夹权限。
chmod 777 /tmp
在物理机上使用的直接修改就可以,像我一样在使用dockerfile创建镜像的,把这行命令加到apt-get update之前就可以。
更多推荐
Couldn‘t create temporary file /tmp/apt.conf.SUhXie for passing config to apt
发布评论