yuk*_*say 1 permissions software-installation tmp
起初我想在我没有 root 访问权限的服务器上安装一个包。由于我没有 root 访问权限,因此我尝试自己构建它,但在配置阶段出现错误。
这是我运行的命令:
cd ~
git clone https://github.com/stella-emu/stella.git
cd stella/
./configure --prefix=$HOME/atari
Run Code Online (Sandbox Code Playgroud)
然后我收到以下错误:
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!
Run Code Online (Sandbox Code Playgroud)
有什么办法可以解决这个问题吗?
以下是一些诊断信息
-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
Run Code Online (Sandbox Code Playgroud)
所以现在我正在尝试使用junest但在运行后再次使用:
git clone git://github.com/fsquillace/junest ~/.local/share/junest
export PATH=~/.local/share/junest/bin:$PATH
Run Code Online (Sandbox Code Playgroud)
我得到:
-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
Run Code Online (Sandbox Code Playgroud)
您需要安排系统管理员修复 上损坏的权限/tmp
。
Run Code Online (Sandbox Code Playgroud)ls -ld /tmp drwxr-xr-x 7 root root 4096 Dec 9 20:39 /tmp
修复:
chmod a=rwx,u+t /tmp
Run Code Online (Sandbox Code Playgroud)
并检查以确保它是正确的:
ls -ld /tmp
drwxrwxrwt 7 root root 8192 Nov 1 14:19 /tmp
Run Code Online (Sandbox Code Playgroud)
然后您可以解决构建过程的其余部分。