- 1 很多类似的报错:file /usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/twofactor/totp.pyc from install of python2-cryptography-2.5-1.el7.x86_64 conflicts with file from package python-cryptography-0.8.2-1.el7.x86_64
- 2 关于安装pip报错,其实系统已经有pip了,报错如图,+tools/install_pip.sh:_install_get_pip:98是这里的问题
- 3 下载bindep报错的话就手动安装 pip install bindep
- 4 下载etcd-v3.3.12-linux-amd64.tar.gz网络连接不好会报错,多试几次
- 5 uwsgi报错,原因是包名字是大写,脚本里是小写,不匹配
- 6 net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)PMD: net_mlx4: cannot load glue library: libmlx4.so.1: cannot open shared object file: No such file or directory
- 7 升级完pip后命令失效
- 8 Command “python setup.py egg_info” failed with error code 1 in /opt/stack/keystone
- https://github.com/novnc/noVNC.git/‘: TCP connection reset by peer">9:安装,NOVNC报错fatal: unable to access ‘https://github.com/novnc/noVNC.git/‘: TCP connection reset by peer
- 10 安装tempest出错:ERROR: full: InterpreterNotFound: python3
- 11 ImportError: version conflict: ‘/usr/lib64/python2.7/site-packages/psutil/_psutil_linux.so’ 包版本冲突
- 12 Didn’t find service registered by hostname after 60 seconds
- 13galance启动失败 /home/devstack/lib/glance:335:die
openstack T版要求python2或者python3.5,U版要求3.8,centos默认下载的3.6,所以不能用U版
systemctl stop firewalld.servicesystemctl disable firewalld.servicefirewall-cmd --statesed -i '/^SELINUX=.*/c SELINUX=disabled' /etc/selinux/configsed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g' /etc/selinux/configgrep --color=auto '^SELINUX' /etc/selinux/configsetenforce 0getenforcesystemctl disable iptables#设置清华yum,阿里的现在维护,用不了mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupvi /etc/yum.repos.d/CentOS-Base.repo#CentOS-Base.repo##The mirror system uses the connecting IP address of the client and the#update status of each mirror to pick mirrors that are updated to and#geographically close to the client. You should use this for CentOS updates#unless you are manually picking other mirrors.##If the mirrorlist= does not work for you, as a fall back you can try the#remarked out baseurl= line instead.##[base]name=CentOS-$releasever - Basebaseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates[updates]name=CentOS-$releasever - Updatesbaseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]name=CentOS-$releasever - Extrasbaseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plusbaseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#更新缓存yum clean allyum makecacheyum install -y gityum install -y epel-releaseyum install -y python-pipyum -y install net-tools#改pip源mkdir ~/.pipvi ~/.pip/pip.conf[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simple[install]trusted-host = https://pypi.tuna.tsinghua.edu.cn#通过设置Git的http缓存大小,解决了这个问题,在当前工程目录下运行如下命令:git config --global http.postBuffer 20M#否则拉代码时候报错error: RPC failed; result=35, HTTP code = 0 fatal: The remote end hung up unexpectedlycd /homeU版要求python3.8,但是默认依赖自动下载了python3.6,报错,换T版不报错git clone https://github.com/openstack-dev/devstack.git --branch stable/ussurigit clone https://github.com/openstack-dev/devstack.git --branch stable/traincd devstack#使用 devstack 提供的工具创建一个 stack 用户cd /home/devstack/tools/./create-stack-user.sh#修改devstack目录权限,让stack用户可以运行chown -R stack:stack /home/devstackchmod 777 /opt/stack -Recho "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack切换到stack用户下# su stack$ cd /home/devstack7、编辑创建local.conf文件,添加以下内容:# MiscADMIN_PASSWORD=adminDATABASE_PASSWORD=$ADMIN_PASSWORDRABBIT_PASSWORD=$ADMIN_PASSWORDSERVICE_PASSWORD=$ADMIN_PASSWORDSERVICE_TOKEN=$ADMIN_PASSWORD# Target PathDEST=/opt/stack# Enable LoggingLOGFILE=$DEST/logs/stack.sh.logVERBOSE=TrueLOG_COLOR=TrueSCREEN_LOGDIR=$DEST/logsKEYSTONE_TOKEN_FORMAT=UUID# Novaenable_service n-novnc n-cauth# Neutrondisable_service n-netENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutronENABLED_SERVICES+=,q-lbaas,q-vpn,q-fwaas# Swift#enable_service s-proxy s-object s-container s-accounts#SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5# CinderVOLUME_GROUP="cinder-volumes"ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak# Ceilometer#enable_service ceilometer-acompute ceilometer-acentral ceilometer-anotification ceilometer-collector ceilometer-api#enable_service ceilometer-alarm-notifier ceilometer-alarm-evaluator# Heatenable_service heat h-api h-api-cfn h-api-cw h-engenable_service tempest# Troveenable_service trove tr-api tr-tmgr tr-cond# Saharaenable_service sahara# Muranoenable_plugin murano git://git.openstack.org/openstack/muranoenable_service murano-cfapienable_service g-glareMURANO_APPS=io.murano.apps.apache.Tomcat,io.murano.apps.Guacamoleenable_service murano murano-api murano-engine博客网络:HOST_IP=10.10.10.129 //本机IP地址FIXED_RANGE=10.0.0.0/24 //私有IP网段NETWORK_GATEWAY=10.0.0.1 //私有网段网关注意:若需要安装其他服务,请参考其他资料。#安装虚拟网桥#ovs-vsctl add-br br-8、运行Devstack,执行安装$ ./stack.sh#上面出错就用下面命令FORCE=yes ./stack.sh
1 很多类似的报错:file /usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/twofactor/totp.pyc from install of python2-cryptography-2.5-1.el7.x86_64 conflicts with file from package python-cryptography-0.8.2-1.el7.x86_64
解决:包冲突,卸载python-cryptography-0.8.2-1.el7.x86_64
sudo yum remove -y python-cryptography-0.8.2-1.el7.x86_64
2 关于安装pip报错,其实系统已经有pip了,报错如图,+tools/install_pip.sh:_install_get_pip:98是这里的问题

解决:注释这行,默认应该是103行 # _install_get_pip python $PIP_GET_PIP_PY27_URL $LOCAL_PIP_PY27
因为这行调上面的 _install_get_pip函数下载pip
function install_get_pip {# _install_get_pip python $PIP_GET_PIP_PY27_URL $LOCAL_PIP_PY27if python3_enabled; thenif [[ "$PYTHON3_VERSION" == "3.5" ]]; thenPIP_GET_PIP_URL=$(dirname $PIP_GET_PIP_URL)/3.5/$(basename $PIP_GET_PIP_URL)LOCAL_PIP=${LOCAL_PIP}-py35fi_install_get_pip python${PYTHON3_VERSION} $PIP_GET_PIP_URL $LOCAL_PIPfi}
3 下载bindep报错的话就手动安装 pip install bindep
4 下载etcd-v3.3.12-linux-amd64.tar.gz网络连接不好会报错,多试几次
5 uwsgi报错,原因是包名字是大写,脚本里是小写,不匹配
解决:https://blog.csdn.net/cojn52/article/details/108003049
修改/devstack/lib/apache 脚本,123-128行按博客修改
#pip_install uwsgi #注释下载120 #pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt121 sudo cp /tmp/uwsgi-2.0.19.tar.gz $dir#这里的意思的把uwsgi复制到mktemp -d生成的历史文件122 local uwsgi123 uwsgi=$(ls uwsgi*)124 mkdir uwsgi-2.0.19 # 这里的意思时创建这个文件夹125 tar xvf $uwsgi -C uwsgi-2.0.19 # 这里的意思时解压时把文件放到这个目录
把uwsgi压缩包名字换成小写,给stack用户这个压缩包所有权限 ,sudo chmod 777 uwsgi.tar
6 net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5)PMD: net_mlx4: cannot load glue library: libmlx4.so.1: cannot open shared object file: No such file or directory
sudo yum install libibverbs libmlx5 libmlx4
7 升级完pip后命令失效

Python 2.7已于2020年1月1日到期,请停止使用。请升级您的Python,因为不再维护Python 2.7。pip 21.0将于2021年1月停止对Python 2.7的支持。pip 21.0将删除对此功能的支持。解决此问题并继续使用不受支持的Python 2.7,不应升级到最新的pip版本,而应升级到<21的版本。
解决方法:sudo pip install —upgrade “pip < 21.0”
或者wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python get-pip.py,实际上用此方法安装了pip20,但是输入pip -V还是显示pip8版本
接下来执行到了这一步,中间有可能存在包下载出错的问题,在执行脚本就行多试几次
8 Command “python setup.py egg_info” failed with error code 1 in /opt/stack/keystone

pip install —upgrade setuptools=34.1.1
如果不指定版本就会遇到如下报错
指定了版本遇到如下报错
解决方法:从错误6开始,不升级pip,只升级setuptools,pip install —upgrade setuptools=33.1.1
会过升级那一步,后面会继续安装很多python的库,如果卡住了就重新执行
后面顺利进行到下载glance,cinder,NEUTRON
9:安装,NOVNC报错fatal: unable to access ‘https://github.com/novnc/noVNC.git/‘: TCP connection reset by peer

解决办法:执行命令 git config —global http.sslverify false可正常下载
含义:通过HTTPS访问Git远程仓库,如果服务器的SSL证书未经过第三方机构签署,那么Git就会报错;命令的意思就是让git忽略ssl证书错误
接下来是安装nova,可会遇到git clone报错的问题,多试几次可以下载
然后安装placement,horizon(下载极慢),tempest
10 安装tempest出错:ERROR: full: InterpreterNotFound: python3

解决办法:sudo yum install python3,然后执行到下图
等了较长时间,一路继续往下执行
11 ImportError: version conflict: ‘/usr/lib64/python2.7/site-packages/psutil/_psutil_linux.so’ 包版本冲突

解决方法:按照提示卸载 sudo pip uninstall psutil
12 Didn’t find service registered by hostname after 60 seconds
感觉是快装完了,之前的日志显示的应该是某些配置
问题一:Didn’t find service registered by hostname after 120 seconds
解决方法:在local.conf中加入
enable_service placement-api
13galance启动失败 /home/devstack/lib/glance:335:die
[ERROR] /home/devstack/lib/glance:335 g-api did not start

