apt-get update 错误
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease [242 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Couldn't create temporary file /tmp/apt.conf.Kzzptk for passing config to apt-key
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
Err:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
Couldn't create temporary file /tmp/apt.conf.0UK24m for passing config to apt-key
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [83.3 kB]
Err:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Couldn't create temporary file /tmp/apt.conf.6Yqv5I for passing config to apt-key
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB]
Err:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Couldn't create temporary file /tmp/apt.conf.iGeQGJ for passing config to apt-key
Reading package lists... Done
W: GPG error: http://ports.ubuntu.com/ubuntu-ports bionic InRelease: Couldn't create temporary file /tmp/apt.conf.Kzzptk for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports 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://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease: Couldn't create temporary file /tmp/apt.conf.0UK24m for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports bionic-updates 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://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease: Couldn't create temporary file /tmp/apt.conf.6Yqv5I for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports bionic-backports 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://ports.ubuntu.com/ubuntu-ports bionic-security InRelease: Couldn't create temporary file /tmp/apt.conf.iGeQGJ for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports 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.
解决办法:
chmod 1777 /tmp