栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

spdk安装详细步骤及问题解决方法

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

spdk安装详细步骤及问题解决方法

spdk安装详细步骤
  • 综述
  • 步骤

综述

官网教程原地址:https://spdk.io/doc/getting_started.html

步骤
  • 1 下载获取源代码
git clone https://github.com/spdk/spdk
cd spdk
git submodule update --init

在执行submodule update时,可能会出现Err:8 http://cn.archive.ubuntu.com/ubuntu groovy Release
404 Not Found [IP: 91.189.91.39 80]和W: Target CNF (multiverse/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list:60这样的错,参考这篇文章可解决

  • 2 安装相关依赖
sudo scripts/pkgdep.sh

这部分可能出现的问题

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python2-minimal:i386 python2:i386 python2-minimal python2 dh-python 2to3
  python-is-python3

E: Package 'python' has no installation candidate
Error!

简单粗暴的方法是:

sudo apt-get update #实际未更新
sudo apt-get upgrade #真正安装了最新的安装包

然后出现某些依赖库版本过高:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'python-is-python2' instead of 'python'
make is already the newest version (4.3-4ubuntu1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libaio-dev : Depends: libaio1 (= 0.3.112-9ubuntu1) but 0.3.112-13 is to be installed
 python3-setuptools : Depends: python3-pkg-resources (= 52.0.0-4) but 59.6.0-1 is to be installed
 uuid-dev : Depends: libuuid1 (= 2.36.1-8ubuntu2) but 2.37.2-4ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
Error!

根据错误信息依次降低至指定版本:

sudo apt-get install libaio1=0.3.112-9ubuntu1
sudo apt-get install python3-pkg-resources=52.0.0-4
sudo apt-get install libuuid1=2.36.1-8ubuntu2

然后可以正常运行

  • 3 编译源文件
sudo ./configure
sudo make
  • 4 运行单元测试
./test/unit/unittest.sh

  • 5 运行示例
cd build/examples
./hello_world

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/688957.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号