【发布时间】:2016-06-08 14:14:41
【问题描述】:
我正在尝试在生产服务器上将软件包安装到我的 Django 应用程序中,并且收到权限被拒绝错误。下面是回溯。我已经使用 pip install 安装了其他软件包,它没有给我任何问题,所以我不完全确定我为什么会遇到这个问题。
[humanlink@web526 ~]$ pip install cryptography
Collecting cryptography
Using cached cryptography-1.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in ./lib/python2.7 (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in ./lib/python2.7 (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in ./lib/python2.7 (from cryptography)
Collecting setuptools>=11.3 (from cryptography)
Using cached setuptools-22.0.5-py2.py3-none-any.whl
Collecting enum34 (from cryptography)
Using cached enum34-1.1.6-py2-none-any.whl
Collecting ipaddress (from cryptography)
Using cached ipaddress-1.0.16-py27-none-any.whl
Collecting cffi>=1.4.1 (from cryptography)
Using cached cffi-1.6.0.tar.gz
Collecting pycparser (from cffi>=1.4.1->cryptography)
Using cached pycparser-2.14.tar.gz
Installing collected packages: setuptools, enum34, ipaddress, pycparser, cffi, cryptography
Found existing installation: setuptools 2.1
Uninstalling setuptools-2.1:
Exception:
Traceback (most recent call last):
File "/home/humanlink/lib/python2.7/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/humanlink/lib/python2.7/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/home/humanlink/lib/python2.7/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install
requirement.uninstall(auto_confirm=True)
File "/home/humanlink/lib/python2.7/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall
paths_to_remove.remove(auto_confirm)
File "/home/humanlink/lib/python2.7/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/humanlink/lib/python2.7/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib64/python2.7/shutil.py", line 302, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/easy_install-2.7'
我如何找出用户是谁?如果我想将用户设置为我,生产服务器的用户是谁?会是我当前在计算机上登录的用户吗?还是托管我的域的公司 Webfaction 的管理员?
【问题讨论】:
-
你试过
sudo -
是的,它是说我不能使用 sudo,因为我的生产服务器上的应用程序不在 sudoers 列表中
-
"humanlink 不在 sudoers 文件中。此事件将被报告。"那是确切的错误
标签: python django pip production