2012-12-02 191 views
0

我正在设置我的VPS来部署我的rails应用程序,但拒绝权限错误一直在我的服务器端发生。我不得不重新安装Perl和卷曲的,现在我得到如下:安装rbenv,权限被拒绝

[email protected]:~$ rbenv bootstrap-ubuntu-12-04 
bash: /usr/bin/python: permission denied 

我尝试重新安装蟒蛇,但没有成功走了过来。我应该如何解决它?

更新:

[email protected]:/home/deployer# cd /usr 
[email protected]:/usr# cd bin 
[email protected]:/usr/bin# cd python 
bash: cd: python: not a directory 

这是否意味着蟒蛇安装不正确?

更新:

[email protected]:~$ ls -l 'which python' 
total 0 
[email protected]:~$ python 
bash: /usr/bin/python: permission denied 

我认为,这表示蟒蛇安装不正确,所以我计算了以下

[email protected]:~$ su root 
[email protected]:/home/deployer# apt-get install python 
python package is already the latest version 

所以我没能找到解决办法呢。

+0

什么是'ls -l \'哪个python \''输出?你可以运行'python',会发生什么? – soulseekah

+0

@soulseekah,请检查更新。 –

+0

'哪个python'必须不被引用,从我的评论拷贝。 – soulseekah

回答

1

事实证明这是一个权限问题,以下是一些关于如何调试试图在这种情况下要执行的二进制,pythonpermission denied错误的一般提示:

ls -l `which python` - 尝试检索完整路径和权限,如-rwxr-xr-x 1 nobody nobody 9644 2012-12-02 13:15 /tmp/env/bin/python

例如,如果权限为0000,则必须以特权用户身份运行。

sudo chmod 0755 /usr/bin/python通常有帮助。