您的位置:首页 > 运维架构

openstack devstack Bad md5 hash for package

2015-12-10 20:11 316 查看
不管用unbunt 14还是ubuntu 15,或者Centos 7.1,运行stack.sh脚本生成devstack时,每次都会在类似下面的步骤中报错返回,只不过不同版本,每次的package不一样
2015-12-10 22:38:18.381 | Collecting requests===2.8.1 (from -c /opt/stack/requirements/upper-constraints.txt (line 292))
2015-12-10 22:38:18.769 | Using cached requests-2.8.1-py2.py3-none-any.whl
2015-12-10 22:38:18.771 | Hash of the package https://pypi.python.org/packages/2.7/r/requests/requests-2.8.1-py2.py3-none-any.whl#md5=46f1d621daa3ab38958a42f51478b1ee (from https://pypi.python.org/simple/requests/) (5d5ef94a1326de1ca405c3f791c09165) doesn't match the expected hash 46f1d621daa3ab38958a42f51478b1ee!
2015-12-10 22:38:18.804 | Bad md5 hash for package https://pypi.python.org/packages/2.7/r/requests/requests-2.8.1-py2.py3-none-any.whl#md5=46f1d621daa3ab38958a42f51478b1ee (from https://pypi.python.org/simple/requests/) 也查了tmp下cache好的package的MD5确实不对,网上查了都是使用pip isntall单独安装这个包,但这种方法试了也不行,还是过不去。
看到pip命令有个--no-cache-dir选项,因此找个stack.sh调用pip install这个命令的脚本,添加该选项试试看
[stack@localhost devstack]$ find ./ -type f |xargs grep pip_install
Binary file ./.git/objects/pack/pack-80e40171dd403496ca97e8059d45d050ed4a79da.pack matches
./inc/python:# pip_install_gr packagename
./inc/python:function pip_install_gr {
./inc/python: pip_install $clean_name
./inc/python:# pip_install package [package ...]
./inc/python:function pip_install {
vi ~/devstack/inc/python文件中的函数
function pip_install
找到pip install命令,添加“--no-cache-dir”选项
cmd_pip="$cmd_pip install --no-cache-dir"
保存退出,stack.sh顺利执行完成

本文出自 “zhoulibo” 博客,转载请与作者联系!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: