标签:openstack
首先说Openstack官网的安装文档做的太棒了,文档链接:http://docs.openstack.org/mitaka/install-guide-rdo/。
但是在执行
yum install python-openstackclient
遇到如下错误,有若干依赖包无法下载。
python2-babel-2.3.4-1.el7.noar FAILED ====- ] 700 kB/s | 4.8 MB 00:00:04 ETA
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-mitaka/common/python2-babel-2.3.4-1.el7.noarch.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=centos-openstack-mitaka clean metadata
Trying other mirror.
解决办法如下:
检查CentOS-OpenStack-mitaka.repo
more /etc/yum.repos.d/CentOS-OpenStack-mitaka.repo
[centos-openstack-mitaka]
name=CentOS-7 - OpenStack mitaka
baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-mitaka/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
将其中的baseurl修改为aliyun或其它的国内源
vi /etc/yum.repos.d/CentOS-OpenStack-mitaka.repo
[centos-openstack-mitaka]
name=CentOS-7 - OpenStack mitaka
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-mitaka/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
上述过程可使用sed直接修改文件完成
sed -i ‘s/mirror.centos.org/mirrors.aliyun.com/g‘ /etc/yum.repos.d/CentOS-OpenStack-mitaka.repo
然后执行
yum --enablerepo=centos-openstack-mitaka clean metadata
或者
yum clean all
之后运行
yum install python-openstackclient
安装过程就不会报错了。
本文出自 “技术无废话版” 博客,请务必保留此出处http://zzabc.blog.51cto.com/2475519/1840801
标签:openstack
原文地址:http://zzabc.blog.51cto.com/2475519/1840801