一、基本情况

系统:u 22.04

python: 3.10

二、问题描述

swagboot官方提供的安装路径言简意赅:python3 -m pip install --user snagboot
当然安装python3和pip基本常识,这里就不再赘述。
可是在安装的时候出现如下提示 Failed building wheel for pylibfdt
尝试单独安装pylibfdt提示类似信息。那怎么办呐?网上一时也没看到解决办法

三、解决问题

去了pypi去查看pylibfdt的描述.发现这个库依赖一些文件

This tree contains a copy of libfdt from the upstream dtc project for the
purposes of pypi.org packaging. Other than changes to the packaging files,
changes should be made upstream. The upstream sources are here:

git://git.kernel.org/pub/scm/utils/dtc/dtc.git


To install this you will need to install swig and Python development files.

On Debian distributions:

   sudo apt-get install swig python3-dev


The module can be installed with pip:

   pip install libfdt

or via setup.py:

   ./setup.py install [--user]

所以要先安装swig, python3的开发者包。因为时间久远我忘记我安装的是python3-dev还是普通版。也没有必要查询,直接再安装一次
sudo apt-get install swig python3-dev
然后重新安装pylibfdt,命令pip install pylibfdt
然后尝试安装swagboot,就成功了。命令前面提到过,我这里简单使用
pip3 install swagboot

四、总结

遇到问题不要慌张,按图索骥,注意看问题提示。

五、补充

下面是一点关于swagboot额外补充信息
上面的命令安装的时候是在用户模式下安装的,如果你在自己虚拟环境中安装需要去掉用户模式
用户模式下,pip安装在”/home/{你的用户名}/.local/bin“也就是”~/.locak/bin“下。这个路径通常是没有放入PATH的,这时候你需要路径添加环境变量中才可以执行swagflash和seagrecover命令

原文地址:https://blog.csdn.net/watershade2010/article/details/134635050

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_27792.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注