Couldn‘t create temporary file /tmp/apt.conf.SUhXie for passing config to apt

编程入门 行业动态 更新时间:2024-10-08 00:29:02

Couldn‘t create temporary <a href=https://www.elefans.com/category/jswz/34/1770945.html style=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

本文发布于:2024-02-27 22:19:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1766766.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:file   tmp   create   temporary   apt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!