Crazyfile cfclient安装问题

按照官网Linux上安装cfclient的教程:

From a fresh Ubuntu 20.04 system and up, running the client form source requires git, pip and a lib for the Qt GUI.

sudo apt install git python3-pip libxcb-xinerama0 libxcb-cursor0
pip3 install --upgrade pip

Clone the repository with git

git clone https://github.com/bitcraze/crazyflie-clients-python
cd crazyflie-clients-python
Installing the client

All other dependencies on linux are handled by pip so to install an editable copy simply run:

pip3 install -e .

遇到问题一:

运行pip3 install -e .时报错如下:

怀疑可能是PyQt的问题,于是查了PyQt及pip是否正常可用,均为正常。于是检查版本,版本正常。

但是在运行pip3 install --upgrade pip时,有一条warning:

  WARNING: The scripts pip, pip3, pip3.10 and pip3.8 are installed in '/home/wzh-2004/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

 于是,按照此warning,在.bashrc文件最后一行加入变量:

export PATH="$HOME/.local/bin:$PATH"

 并在终端中输入以下命令,使变量立即生效。

source ~/.bashrc

 再次运行 pip3 install -e .   可正常安装。

遇到问题二:

使用cfclient命令启动客户端时,无法启动。

看起来出现了关于Qt平台插件的加载问题。错误消息表明应用程序无法初始化任何Qt平台插件,因此无法启动。

在Linux系统上,Qt应用程序通常需要XCB(X protocol C-language Binding)平台插件来与X Window系统进行通信。如果缺少必要的依赖项或配置不正确,就会出现无法加载Qt平台插件的错误。

解决此问题的一种方法是安装所需的依赖项。根据错误消息,尝试安装libxcb-xinerama0xcb-cursor0libxcb-cursor0。可以使用以下命令安装这些依赖项:

sudo apt install libxcb-xinerama0 xcb-cursor0

或者,根据系统可能需要使用libxcb-cursor0替代xcb-cursor0

sudo apt install libxcb-xinerama0 libxcb-cursor0

安装完成后,尝试重新运行cfclient命令,问题得到解决。

  • 11
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值