简体   繁体   English

如何在ubuntu上安装devstack kilo时解决此错误

[英]How to resolve this error while installing devstack kilo on ubuntu

This is what I did: 这就是我做的:

1) Cloned devstack kilo using the command: 1)克隆devstack kilo使用命令:

git clone https://github.com/openstack-dev/devstack.git -b stable/kilo git clone https://github.com/openstack-dev/devstack.git -b stable / kilo

2) cd devstack 2)cd devstack

3) ./stack.sh 3)./ .stack.sh

I get the following error while installing devstack kilo on ubuntu. 在ubuntu上安装devstack kilo时出现以下错误。

You are using pip version 7.1.2, however version 8.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
+ local 'test_req=testtools>=0.9.36,!=1.2.0,<2.0.0/test-requirements.txt'
+ [[ -e testtools>=0.9.36,!=1.2.0,<2.0.0/test-requirements.txt ]]
+ pip_install_gr os-testr
+ local name=os-testr
++ get_from_global_requirements os-testr
++ local package=os-testr
+++ grep -i -h '^os-testr' /opt/stack/requirements/global-requirements.txt
+++ cut -d# -f1 grep: /opt/stack/requirements/global-requirements.txt: No such file or directory
++ local required_pkg=
++ [[ '' == '' ]]
++ die 142 'Can'\''t find package os-testr in requirements'
++ local exitcode=0
++ set +o xtrace [ERROR] /home/nikhil/devstack/inc/python:142 Can't find package os-testr in requirements
+ local 'clean_name=[Call Trace] ./stack.sh:715:pip_install_gr /home/nikhil/devstack/inc/python:63:get_from_global_requirements /home/nikhil/devstack/inc/python:142:die'
+ pip_install '[Call' 'Trace]' ./stack.sh:715:pip_install_gr /home/nikhil/devstack/inc/python:63:get_from_global_requirements /home/nikhil/devstack/inc/python:142:die
++ set +o
++ grep xtrace
+ local 'xtrace=set -o xtrace'
+ set +o xtrace
+ sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS=file:///opt/stack/.wheelhouse /usr/local/bin/pip install '[Call' 'Trace]' ./stack.sh:715:pip_install_gr /home/nikhil/devstack/inc/python:63:get_from_global_requirements /home/nikhil/devstack/inc/python:142:die Exception: Traceback (most recent call last):   File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)   File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 282, in run
    wheel_cache   File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 272, in populate_requirement_set
    wheel_cache=wheel_cache   File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 213, in from_line
    wheel_cache=wheel_cache, constraint=constraint)   File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 67, in __init__
    req = pkg_resources.Requirement.parse(req)   File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2980, in parse
    reqs = list(parse_requirements(s))   File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2911, in parse_requirements
    raise RequirementParseError("Missing distribution spec", line) RequirementParseError: Missing distribution spec [Call You are using pip version 7.1.2, however version 8.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
+ exit_trap
+ local r=2
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 2 -ne 0 ]]
+ echo 'Error on exit' Error on exit
+ generate-subunit 1455806136 50 fail ./stack.sh: line 463: generate-subunit: command not found

Here is the screenshot: 这是截图:

devstack安装错误

I think that the error is caused by the python package. 我认为错误是由python包引起的。 I updated python and tried again but no avail. 我更新了python并再次尝试但无济于事。

What is the error and how can I solve it please? 什么是错误,我该如何解决?

In your command line: 在您的命令行中:

sudo apt-get install python-pip
sudo pip install --upgrade pip
sudo pip install -U os-testr 

This worked fine for me... 这对我来说很好......

This worked for me. 这对我有用。

sudo apt-get install python-pip

sudo pip install --upgrade pip

Looks like I've installed and upgraded python. 看起来我已经安装并升级了python。

I remember trying this before but it didn't work. 我记得以前试过这个,但它不起作用。 I don't know why, but it worked now. 我不知道为什么,但它现在奏效了。

It would be helpful if anyone can state the reason behind the error and delineate the solution. 如果任何人都能说明错误背后的原因并描述解决方案,那将会很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM