首页 > 其他分享 >anolis 8 安装部署spdk

anolis 8 安装部署spdk

时间:2024-09-09 18:25:06浏览次数:3  
标签:github 部署 anolis python spdk install ID python3

SPDK的部署可以参考官方 https://github.com/spdk/spdk 有文档

这里记录一下,基于 Anolis OS release 8.6 kernel 5.10.134-13.an8.x86_64v 下的部署以及遇到的问题

使用 v22 版本 , 这里会git clone github项目,国内访问github会失败,建议自行GG解决github访问过慢问题哈

下载 源代码
#cd /opt
#git clone -b v22.09.x http://github.com/spdk/spdk
#cd spdk
#git submodule update --init    //这里会遇到各种github不通问题,不断地执行该命令,直到不报错为止
前提准备 , 自动安装SPDK相关依赖包
#./scripts/pkgdep.sh    //这里很愉快的完成了
编译
#./configure
#make
单元测试
#./test/unit/unittest.sh 
错误
  1. 遇到pip 安装grpcio 相关包失败的
#vim scripts/pkgdep/rhel.sh

if ! [[ $ID == centos && $VERSION_ID == 7 ]]; then
        # Problem with modules compilation on Centos7
        pip3 install grpcio -i https://pypi.tuna.tsinghua.edu.cn/simple
        pip3 install grpcio-tools -i https://pypi.tuna.tsinghua.edu.cn/simple
fi
  1. 提示安装python 失败 , Error: Unable to find a match: python
#vim scripts/pkgdep/centos.sh 
if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rhel 8|rocky 8'; then
        yum install -y python36 python36-devel
        #Create hard link to use in SPDK as python
        if [[ ! -e /usr/bin/python && -e /etc/alternatives/python3 ]]; then
                ln -s /etc/alternatives/python3 /usr/bin/python
        fi
else
        yum install -y python3-devel
        #yum install -y python python3-devel
  1. There are following alternatives for “python”: python2, python36, python38, python39
#vim scripts/pkgdep/centos.sh 
支持龙溪 8使用python 36
if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rhel 8|rocky 8|anolis 8'; then
        yum install -y python36 python36-devel
        #Create hard link to use in SPDK as python
        if [[ ! -e /usr/bin/python && -e /etc/alternatives/python3 ]]; then
                ln -s /etc/alternatives/python3 /usr/bin/python
        fi
else
        yum install -y python python3-devel
fi

标签:github,部署,anolis,python,spdk,install,ID,python3
From: https://blog.csdn.net/u010494323/article/details/142065889

相关文章