apt update
Get:1 http://mirrors.aliyun.com/ubuntu bionic InRelease [242 kB]
Err:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
Couldn't create temporary file /tmp/apt.conf.oLa8r3 for passing config to apt-key
Get:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease [88.7 kB]
Err:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
Couldn't create temporary file /tmp/apt.conf.P5tRM6 for passing config to apt-key
Get:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [88.7 kB]
Err:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
Couldn't create temporary file /tmp/apt.conf.txMvtd for passing config to apt-key
Get:4 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease [242 kB]
Err:4 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
Couldn't create temporary file /tmp/apt.conf.WWDzwi for passing config to apt-key
Get:5 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease [83.3 kB]
Err:5 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
Couldn't create temporary file /tmp/apt.conf.tK37uk for passing config to apt-key
Reading package lists... Done
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic InRelease: Couldn't create temporary file /tmp/apt.conf.oLa8r3 for passing config to apt-key
E: The repository 'http://mirrors.aliyun.com/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-security InRelease: Couldn't create temporary file /tmp/apt.conf.P5tRM6 for passing config to apt-key
E: The repository 'http://mirrors.aliyun.com/ubuntu bionic-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error
更换其他源无果
成功解决:chmod 777 /tmp
参考文章:
Couldn't create temporary file /tmp/apt.conf.g1YDx9_configguess 在哪个文件夹-CSDN博客