Couldn't create temporary file /tmp/apt.conf.LgwPZm for passing config to apt-key

Problem

root@mywsl:~# apt-get update
Hit:1 http://mirror.primelink.net.id/kali kali-rolling InRelease
Err:1 http://mirror.primelink.net.id/kali kali-rolling InRelease
Couldn't create temporary file /tmp/apt.conf.LgwPZm for passing config to apt-key
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirror.primelink.net.id/kali kali-rolling InRelease: Couldn't create temporary file /tmp/apt.conf.LgwPZm for passing config to apt-key
W: Failed to fetch http://mirror.primelink.net.id/kali/dists/kali-rolling/InRelease Couldn't create temporary file /tmp/apt.conf.LgwPZm for passing config to apt-key
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@mywsl:~# apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done

Solution

root@mywsl:~# chmod 777 /tmp
root@mywsl:~# apt-get update
Hit:1 http://mirror.primelink.net.id/kali kali-rolling InRelease
Reading package lists... Done