Kiruthika kanagarajan
Kiruthika kanagarajan

Reputation: 954

Cannot create temporary file - mkstemp: No such file or directory

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

Answers (3)

Shuhaib N C
Shuhaib N C

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

Iain4D
Iain4D

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

Kiruthika kanagarajan
Kiruthika kanagarajan

Reputation: 954

May be you could have deleted your /tmp directory mkdir -p /tmp/mkstempc resolves the problem.

Upvotes: 4

Related Questions