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

spdk安装详细步骤及问题解决方法,第1张

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

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5689467.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-17
下一篇2022-12-17

发表评论

登录后才能评论

评论列表(0条)

    保存