- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我遇到了这个链接所说的完全相同的问题:pip install Failed in OpenShift, the error info is Permission Denied .我在将 django-oscar
部署到 openshift 时遇到了错误。为了简化问题,我通过创建一个新墨盒进行了测试。然后通过ssh访问我的openshift服务器执行下一个命令:pip install django-oscar
。它有一个好的开始但一个糟糕的结局,如下面的代码所示:
mrju@mrju:~/Documents/My_Project/My_Website/Oscar_Test$ rhc app create oscartest python-2.7
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Application Options
-------------------
Domain: mrju
Cartridges: python-2.7
Gear Size: default
Scaling: no
Creating application 'oscartest' ... done
Waiting for your DNS name to be available ... done
Cloning into 'oscartest'...
The authenticity of host 'oscartest-mrju.rhcloud.com (52.3.216.108)' can't be established.
RSA key fingerprint is cf:ee:77:cb:0e:fc:02:d7:72:7e:ae:80:c0:90:88:a7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'oscartest-mrju.rhcloud.com,52.3.216.108' (RSA) to the list of known hosts.
Your application 'oscartest' is now available.
mrju@mrju:~/Documents/My_Project/My_Website/Oscar_Test$ ssh 5773c52c2d52710e5e00024a@oscartest-mrju.rhcloud.com
*********************************************************************
You are accessing a service that is for use only by authorized users.
If you do not have authorization, discontinue use at once.
Any use of the services is subject to the applicable terms of the
agreement which can be found at:
https://www.openshift.com/legal
*********************************************************************
Welcome to OpenShift shell
This shell will assist you in managing OpenShift applications.
!!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
Shell access is quite powerful and it is possible for you to
accidentally damage your application. Proceed with care!
If worse comes to worst, destroy your application with "rhc app delete"
and recreate it
!!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
Type "help" for more info.
[oscartest-mrju.rhcloud.com 5773c52c2d52710e5e00024a]\>
[oscartest-mrju.rhcloud.com 5773c52c2d52710e5e00024a]\> cd /var/lib/openshift/5773c52c2d52710e5e00024a/python//virtenv/
[oscartest-mrju.rhcloud.com virtenv]\> ls
bin include lib lib64 pip-selfcheck.json
[oscartest-mrju.rhcloud.com virtenv]\> source bin/activate
(virtenv)[oscartest-mrju.rhcloud.com virtenv]\> pip install django-oscar
***The directory '/var/lib/openshift/5773c52c2d52710e5e00024a/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.***
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The directory '/var/lib/openshift/5773c52c2d52710e5e00024a/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting django-oscar
Downloading django_oscar-1.2.1-py2.py3-none-any.whl (5.6MB)
100% |████████████████████████████████| 5.6MB 39kB/s
Collecting phonenumbers<8.0.0,>=6.3.0 (from django-oscar)
Downloading phonenumbers-7.4.3.tar.gz (2.3MB)
100% |████████████████████████████████| 2.3MB 81kB/s
Collecting factory-boy<2.7,>=2.4.1 (from django-oscar)
Downloading factory_boy-2.6.1-py2.py3-none-any.whl
Collecting purl>=0.7 (from django-oscar)
Downloading purl-1.3-py2.py3-none-any.whl
Collecting mock<2.0,>=1.0.1 (from django-oscar)
Downloading mock-1.3.0-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 57kB 3.7MB/s
Collecting django<1.9,>=1.7.8 (from django-oscar)
Downloading Django-1.8.13-py2.py3-none-any.whl (6.2MB)
100% |████████████████████████████████| 6.2MB 61kB/s
Collecting django-haystack<2.5.0,>=2.3.1 (from django-oscar)
Downloading django_haystack-2.4.1-py2-none-any.whl (95kB)
100% |████████████████████████████████| 98kB 3.9MB/s
Collecting django-treebeard>=3.0 (from django-oscar)
Downloading django-treebeard-4.0.1.tar.gz (93kB)
100% |████████████████████████████████| 94kB 2.6MB/s
Collecting django-extra-views<0.6.5,>=0.2 (from django-oscar)
Downloading django_extra_views-0.6.4-py27-none-any.whl
Collecting pillow>=1.7.8 (from django-oscar)
Downloading Pillow-3.2.0.zip (10.5MB)
100% |████████████████████████████████| 10.5MB 22kB/s
Collecting Unidecode<0.05,>=0.04.12 (from django-oscar)
Downloading Unidecode-0.04.19.tar.gz (204kB)
100% |████████████████████████████████| 204kB 1.4MB/s
Collecting sorl-thumbnail==12.3 (from django-oscar)
Downloading sorl_thumbnail-12.3-py2.py3-none-any.whl (40kB)
100% |████████████████████████████████| 40kB 4.2MB/s
Collecting django-tables2<1.1,>=1.0.4 (from django-oscar)
Downloading django-tables2-1.0.7.tar.gz (966kB)
100% |████████████████████████████████| 970kB 343kB/s
Collecting Babel<3.0,>=1.0 (from django-oscar)
Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB)
100% |████████████████████████████████| 7.1MB 46kB/s
Collecting django-widget-tweaks>=1.4.1 (from django-oscar)
Downloading django_widget_tweaks-1.4.1-py2.py3-none-any.whl
Collecting fake-factory>=0.5.0 (from factory-boy<2.7,>=2.4.1->django-oscar)
Downloading fake_factory-0.5.8-py2.py3-none-any.whl (505kB)
100% |████████████████████████████████| 507kB 618kB/s
Requirement already satisfied (use --upgrade to upgrade): six in /opt/rh/python27/root/usr/lib/python2.7/site-packages (from purl>=0.7->django-oscar)
Collecting funcsigs (from mock<2.0,>=1.0.1->django-oscar)
Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock<2.0,>=1.0.1->django-oscar)
Downloading pbr-1.10.0-py2.py3-none-any.whl (96kB)
100% |████████████████████████████████| 98kB 3.5MB/s
Collecting pytz>=0a (from Babel<3.0,>=1.0->django-oscar)
Downloading pytz-2016.4-py2.py3-none-any.whl (480kB)
100% |████████████████████████████████| 483kB 404kB/s
Collecting python-dateutil>=2.4 (from fake-factory>=0.5.0->factory-boy<2.7,>=2.4.1->django-oscar)
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
100% |████████████████████████████████| 204kB 1.1MB/s
Collecting ipaddress (from fake-factory>=0.5.0->factory-boy<2.7,>=2.4.1->django-oscar)
Downloading ipaddress-1.0.16-py27-none-any.whl
Building wheels for collected packages: phonenumbers, django-treebeard, pillow, Unidecode, django-tables2
Exception:
Traceback (most recent call last):
File "/var/lib/openshift/5773c52c2d52710e5e00024a/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/pip/commands/install.py", line 293, in run
wb.build(autobuilding=True)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/pip/wheel.py", line 756, in build
ensure_dir(output_dir)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/pip/utils/__init__.py", line 70, in ensure_dir
os.makedirs(path)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/python/virtenv/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/python/virtenv/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/python/virtenv/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/python/virtenv/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/python/virtenv/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/python/virtenv/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/var/lib/openshift/5773c52c2d52710e5e00024a/python/virtenv/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/openshift/5773c52c2d52710e5e00024a/.cache'
(virtenv)[oscartest-mrju.rhcloud.com virtenv]\>
提示很有用
The directory '/var/lib/openshift/5773c52c2d52710e5e00024a/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The directory '/var/lib/openshift/5773c52c2d52710e5e00024a/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
但是我不知道如何获得 sudo 的许可或如何使用 sudo 的 -H 标志。
最佳答案
不要使用 sudo
如果你使用 pip
从虚拟环境中(根据您发布的代码判断,您是虚拟环境),因为这将在虚拟环境中全局安装软件包,不。
相反,您可以使用 pip
与 --user
像这样标记:
pip install --user <package_name>
如果失败,请尝试升级 pip
按照回溯建议,然后尝试重新安装
关于python - Openshift [Errno 13] 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38102086/
我删除数据库失败: mysql> 删除数据库 mydb; 错误 1010 (HY000):删除数据库时出错(不能 rmdir './mydb',errno: 39) 目录 db/mydb 存在于 my
据我所知,python的异常返回的errnos大部分与“linux/errno.h”中的errnos相同。但有时,事情并不像我期望的那样: 例如,当一个socket连接抛出一个socket.timeo
我们是否需要在调用函数之前将errno 重置为零?请参见下面的代码。现在的场景是 a_dest_path 是一个现有目录。但是当我执行代码时,它总是尝试 mkdir 但返回错误说该目录无法创建,因为它
在Red Hat Enterprise Linux Server release 5.7 上配置YUM本地源时,遇到了"[Errno 5] OSError: [Errno 2] No su
我正在尝试制作在线FPS游戏,到目前为止,它可以在我的本地网络上运行。我正在尝试做的是使其在全局范围内运作 过去,我曾尝试过使其他Python项目在全局范围内工作,但到目前为止,我还无法使其正常工作。
我希望获得有关在 Python 2.7 中使用urlopen时出现IOError: [Errno socket error] [Errno 10060]的更多信息。我正在使用我的个人 35MB/s 互
来自 linux 中 fwrite 的手册页, 描述 函数 fread() 从 stream 指向的流中读取数据的 nmemb 元素,每个 size 字节长,并将它们存储在 ptr 给定的位置。
我试图了解 glibc 如何在预处理器不替换 errno 符号的情况下初始化 errno。 我首先尝试自己基于csu/errno-loc.c实现了一个简单的版本和 csu/errno.c : myer
我看过这段代码: #if !defined(errno) extern int errno; #endif 所以我的问题是 errno 是 int 还是 macro ,因为使用 #if if 可以检查
errno.h 中的这 2 个 linux 错误有什么区别? 23 和 24 我尝试了 2 个不同的网站,但无法理解两者之间的区别。 [EMFILE] Too many open files. [EN
操作系统:Oracle Linux 6 [xxx@host /etc]$ uname -a Linux slc08yld 2.6.39-400.298.2.el5uek #1 SMP Mon Jan
什么样的库函数所面临的什么样的错误会影响errno并将其设置为非零值?在我下面的程序中,我打算使用 if(errno!=0) 作为条件来检查我使用的库函数是否正常运行,这是我发现的(见下面的代码):
我有一个 python 脚本,它创建一个 tar 文件,将文件移动到 tar 文件中,然后删除它们。 我可以毫无问题地手动运行脚本。但是当它从 cron 运行时,它失败了: IOError: [Err
我已经安装了 TensorFlow。当我下载 MNISTdataset 时,存在一个错误。谁能告诉我出了什么问题?非常感谢!错误详情如下: Python 2.7.9 (default, Apr 2
我正在尝试运行我的 python 代码,它显示以下内容: IOError: [Errno socket error] [Errno 54] Connection reset by peer 这是我的代
我正在将大量金融时间序列数据写入单个 CSV 文件。在一个实例中,我发现 to_csv 方法反复失败,但我终生无法弄清楚原因。在调用 to_csv 方法期间,一切都会挂起 10-15 分钟以上。在因错
我正在尝试从我的Python脚本打开文件recentlyUpdated.yaml。但当我尝试使用时:。我收到一个错误,内容是:。为什么?我怎样才能解决这个问题?
我正在尝试从我的Python脚本打开文件recentlyUpdated.yaml。但当我尝试使用时:。我收到一个错误,内容是:。为什么?我怎样才能解决这个问题?
我正在尝试从我的Python脚本打开文件recentlyUpdated.yaml。但当我尝试使用时:。我收到一个错误,内容是:。为什么?我怎样才能解决这个问题?
请解释以下程序中发生了什么。 我在程序的开头和结尾检查了 strerror(errno) 返回的地址,并确认它每次都返回相同的地址。然后一旦确定这一点,在第一种情况下我继续将相同的地址分配给 ptr,
我是一名优秀的程序员,十分优秀!