In centos when installing package yum install <package>
it didn't work & throws the error as Cannot create temporary file - mkstemp: No such file or directory
Cannot create temporary file - mkstemp: No such file or directory
11k views Asked by Kiruthika kanagarajan At
3
There are 3 answers
1
On
I had a similar issue.
Discovered that my environment variable TMP was set to ~/tmp . As root, dnf didn't like that. so I
$ unset TMP
Then (CentOS stream 8)
'dnf install <package>'
worked fine.
For more background, a similar question was asked, but no specific resolution: https://serverfault.com/questions/1030768/linux-error-creating-temporary-file-var-tmp
May be you could have deleted your
/tmp
directorymkdir -p /tmp/mkstempc
resolves the problem.