Reputation: 954
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
Upvotes: 2
Views: 14502
Reputation: 1
Most probably you have deleted /tmp directory
Create /tmp directory again
sudo mkdir /tmp
For termux mkdir /data/data/com.termux/files/usr/tmp
Upvotes: 0
Reputation: 31
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
Upvotes: 2
Reputation: 954
May be you could have deleted your /tmp
directory
mkdir -p /tmp/mkstempc
resolves the problem.
Upvotes: 4