mktemp:テンプレートからディレクトリを作成できません。権限が拒否されました。

mktemp:テンプレートからディレクトリを作成できません。権限が拒否されました。

最初は、ルートアクセスなしでサーバーにパッケージをインストールしようとしました。ルートアクセス権がないため、自分で構築してみましたが、構成段階でエラーが発生しました。

私が実行したコマンドは次のとおりです。

cd ~
git clone https://github.com/stella-emu/stella.git
cd stella/
./configure --prefix=$HOME/atari

その後、次のエラーが発生します。

Running Stella configure...
mkdir: cannot create directory `/tmp/cg-2059': Permission denied
config.guess: cannot create a temporary directory in /tmp
Looking for C++ compiler... none found!

この問題を解決する方法はありますか?

以下は、いくつかの診断情報です。

-bash-4.2$ ls -ld /tmp
drwxr-xr-x 7 root root 4096 Dec  9 20:39 /tmp
-bash-4.2$ find /tmp -mindepth 1 -maxdepth 1 -printf x | wc -c
12
-bash-4.2$ mkdir ~/tmp
-bash-4.2$ ls
amin  bs94  Maildir  public_html  skel.tar.gz  speedtest_cli.py  speedtest.py  stella  tajdari  tmp
-bash-4.2$ cd stella/
-bash-4.2$ TMPDIR="$HOME/tmp" ./configure --prefix=$HOME/atari
Running Stella configure...
Looking for C++ compiler... none found!
-bash-4.2$ type -a c++ g++ clang++
c++ is /usr/bin/c++
g++ is /usr/bin/g++
-bash: type: clang++: not found
-bash-4.2$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.11 (wheezy)
Release:    7.11
Codename:   wheezy

だから今試してみます。6月ただし、再実行した後:

git clone git://github.com/fsquillace/junest ~/.local/share/junest
export PATH=~/.local/share/junest/bin:$PATH

私は得る:

-bash-4.2$ junest
mktemp: failed to create directory via template `/tmp/junest.XXXXXXXXXX': Permission denied
Error: null argument 
-bash-4.2$ junest -u
mktemp: failed to create directory via template `/tmp/junest.XXXXXXXXXX': Permission denied
Error: null argument 

ベストアンサー1

システム管理者が破損した権限を回復する準備をする必要があります/tmp

ls -ld /tmp
drwxr-xr-x 7 root root 4096 Dec 9 20:39 /tmp

修理する:

chmod a=rwx,u+t /tmp

そしてそれが正しいことを確認してください:

ls -ld /tmp
drwxrwxrwt 7 root root 8192 Nov  1 14:19 /tmp

それではあなたはできます。残りのビルドプロセスを扱う

おすすめ記事