# 构建buildroot文件系统(QT)并移植开发板的有关问题

本文档详细介绍了在使用Buildroot构建文件系统时遇到的问题及其解决方案,包括Python环境安装、内核版本匹配、Qt平台插件缺失、环境变量设置和udev库加载失败等。通过针对性的步骤和配置修改,成功解决了这些问题,确保了交叉编译过程的顺利进行和最终应用程序的正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

构建buildroot文件系统并移植开发板的有关问题

问题1:报错没安装python

(1)安装python36

wget http://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz  
tar -xvzf Python-3.6.4.tgz  
cd Python-3.6.4  
./configure --with-ssl  
make  
sudo make install

(2)安装python运行环境

sudo apt-get install python
sudo apt-get install python-dev(编译外部模块文件使用的)
sudo apt-get install python-pip
sudo apt-get install libxml*
sudo apt-get install net-tools
sudo apt-get install lsof
重新编译;

问题3:kernal版本:expected4.1.x got 4.0x

说明buildroot配置有问题
解决办法:
在system confi…把kerna版本从4.1x改为4…0x

问题4:

qt.qpa.plugin: Could not find the Qt platform plugin “eglfs” in “”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
解决办法:使用builtroot的qmake重新编译 运行工程时:./serial -platform linuxfb

问题5:QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root’问

export XDG_RUNTIME_DIR=/usr/lib/
export RUNLEVEL=3

在etc/profile加上

问题6:Failed to load the library: udev, supported version(s): 1 and 0

在这里插入图片描述

解决办法:
在buildroot配置时,system configration 里面选择 eudev 不要选mdev
重新make
在这里插入图片描述
最后运行交叉编译好的历程:
在这里插入图片描述
无报错说明运行成功

问题四:字体库缺失

QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/lib/fonts.
把字体库放在lib/fonts(新建),并设置环境变量
export QT_QPA_FONTDIR=/lib/fonts
字体文件在我的资源里面,需要自取。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

@Rangers

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值