树莓派安装QT5步骤
这篇博客里面有步骤,但是我在安装时候遇到了一下问题,我一开始没有查到怎么解决就重装了系统,最后发现应该是源的问题,就写了这个来记录一下,希望能帮助到和我一样玩树莓派的小伙伴。

1.命令行输入:sudo apt-get update

2.命令行输入:sudo apt-get upgrade

3.命令行输入:sudo rpi-update

4.命令行输入:sudo apt-get install qt5-default

5.命令行输入:sudo apt-get install qtcreator

但是我在运行第4步时候会出现以下问题

正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:下列软件包有未满足的依赖关系:qt5-default : 依赖: qtbase5-dev 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

这个是因为树莓派下载源的问题,
把源更新回去就好了
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak.1
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak.1
先把原来的源备份

然后更换源

1、编辑软件源配置,删除原来所有文字,换成下面的
sudo nano /etc/apt/sources.list

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Ctrl+o 保存,之后回车确认,然后 Ctrl+x 退出

2、编辑系统源配置删除原来所有文字,换成下面的
sudo nano /etc/apt/sources.list.d/raspi.list

deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main

然后更新软件源列表
sudo apt-get update

pi@raspberrypi:~ $ sudo apt-get update
获取:1 http://mirrors.aliyun.com/raspbian/raspbian stretch InRelease [15.0 kB]
获取:2 http://mirrors.aliyun.com/raspbian/raspbian stretch/contrib Sources [75.2 kB]
获取:3 http://mirrors.aliyun.com/raspbian/raspbian stretch/non-free Sources [125 kB]
获取:4 http://mirrors.aliyun.com/raspbian/raspbian stretch/main Sources [9,722 kB]
获取:5 http://mirrors.aliyun.com/raspbian/raspbian stretch/main armhf Packages [11.7 MB]
获取:6 http://mirrors.aliyun.com/raspbian/raspbian stretch/contrib armhf Packages [56.9 kB]
获取:7 http://mirrors.aliyun.com/raspbian/raspbian stretch/non-free armhf Packages [95.5 kB]
获取:8 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
获取:9 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch/main armhf Packages [220 kB]
获取:10 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch/ui armhf Packages [45.0 kB]
已下载 22.0 MB,耗时 19秒 (1,132 kB/s)
正在读取软件包列表... 完成

命令行输入:sudo apt-get upgrade

ps这个在更新时候发现一个问题,就是下载的时候前几秒速度很快,然后就速度只有几十k,要等很久。
我更新下载时候就执行这个命令,速度变慢之后Ctrl+c然后再执行,就利用前几秒很快的速度完成了更新。实在不行就只能等了,或者翻个墙啥的不知道有没有用(我没翻过)。

命令行输入:sudo rpi-update

这个好像成不成功都没啥关系;反正我这里是没成功的,但是好像不影响的下载qt;

pi@raspberrypi:~ $ sudo rpi-update*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom*** Performing self-update% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接!!! Failed to download update for rpi-update!!!! Make sure you have ca-certificates installed and that the time is set correctly

然后命令行输入:sudo apt-get install qt5-default

pi@raspberrypi:~/bishe/shell $ sudo apt-get install qt5-default
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:libegl-dev libgl-dev libgles-dev libgles2-mesa-dev libglx-dev libqt5opengl5-dev libvulkan-dev libxext-dev qt5-qmakeqt5-qmake-bin qtbase5-dev qtbase5-dev-tools qtchooser x11proto-xext-dev
建议安装:libxext-doc default-libmysqlclient-dev firebird-dev libegl1-mesa-dev libgl1-mesa-dev libpq-dev libsqlite3-devunixodbc-dev
下列【新】软件包将被安装:libegl-dev libgl-dev libgles-dev libgles2-mesa-dev libglx-dev libqt5opengl5-dev libvulkan-dev libxext-dev qt5-defaultqt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools qtchooser x11proto-xext-dev
升级了 0 个软件包,新安装了 15 个软件包,要卸载 0 个软件包,有 5 个软件包未被升级。
需要下载 3,448 kB 的归档。
解压缩后会消耗 28.7 MB 的额外空间。
您希望继续执行吗? [Y/n] Y
获取:1 http://archive.raspberrypi.org/debian buster/main armhf libglx-dev armhf 1.3.0-7~bpo10+1 [16.4 kB]
获取:2 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libvulkan-dev armhf 1.1.97-2 [390 kB]
获取:3 http://archive.raspberrypi.org/debian buster/main armhf libgl-dev armhf 1.3.0-7~bpo10+1 [100 kB]
获取:6 http://archive.raspberrypi.org/debian buster/main armhf libegl-dev armhf 1.3.0-7~bpo10+1 [19.3 kB]
获取:7 http://archive.raspberrypi.org/debian buster/main armhf libgles-dev armhf 1.3.0-7~bpo10+1 [50.4 kB]
获取:4 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf x11proto-xext-dev all 2018.4-4 [3,128 B]
获取:8 http://archive.raspberrypi.org/debian buster/main armhf libgles2-mesa-dev armhf 19.3.2-1~bpo10+1~rpt1 [49.2 kB]
获取:10 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf qtchooser armhf 66-2 [23.1 kB]
获取:5 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libxext-dev armhf 2:1.3.3-1+b2 [102 kB]
获取:9 http://mirrors.ustc.edu.cn/raspbian/raspbia......(后面还有一大堆就不往上放了,反正问题解决了就是了)

然后命令行输入:sudo apt-get install qtcreator

pi@raspberrypi:~/bishe/shell $ sudo apt-get install qtcreator
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:binfmt-support clang clang-7 geoclue-2.0 iio-sensor-proxy libbotan-2-9 libclang-common-7-dev libclang1-7 libffi-devlibgc1c2 libllvm7 libmbim-glib4 libmbim-proxy libmm-glib0 libncurses-dev libobjc-8-dev libobjc4 libomp-7-dev libomp5-7libqbscore1.12 libqbsqtprofilesetup1.12 libqmi-glib5 libqmi-proxy libqt5designercomponents5 libqt5positioning5libqt5qml5 libqt5quick5 libqt5quicktest5 libqt5quickwidgets5 libqt5script5 libqt5sensors5 libqt5webchannel5libqt5webkit5 libqt5xmlpatterns5 libtinfo-dev libtspi1 llvm-7 llvm-7-dev llvm-7-runtime modemmanager qbs-commonqdoc-qt5 qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-layoutsqml-module-qtquick-window2 qml-module-qtquick2 qmlscen......(此处继续省略后面的步骤)

自此,QT安装成功

如果有幸能帮到哪个小伙伴那真的是太好了!

解决树莓派无法安装QT5 的问题相关推荐

  1. 树莓派4B安装QT5

    一开始树莓派烧录好系统之后开机正常,然后我把QT安装上了,然后关机再开机之后就黑屏,一直以为是系统问题,重刷了三四次系统还是不行,最后发现是QT安装的问题... 下面这个安装方法针对的是bullsey ...

  2. 关于 安装Qt5.15.2启动QtCreator后“应用程序无法正常启动0xc0000022” 的解决方法

    若该文为原创文章,转载请注明原文出处 本文章博客地址:https://hpzwl.blog.csdn.net/article/details/125244311 红胖子(红模仿)的博文大全:开发技术集 ...

  3. 树莓派4b安装win11/10过程全教程(附蓝屏inaccessible boot device解决办法)

    由于之前树莓派跑的win11越来越慢,我就想着重装一下系统,在选择系统方面,网上找了好多资料,有推荐Raspbian的(已经装了一张tf卡了),Ubuntu的(体验超级差),还有Debian的.Cen ...

  4. ubuntu安装QT5.14.2:编译项目报错、不能输入中文解决

    QT安装 QT源码和SDK下载 https://download.qt.io/archive/qt/ http://www.qt.io/ http://download.qt.io/ http://w ...

  5. 树莓派64位系统bullseye如何成功安装Qt5

    树莓派64位系统bullseye如何成功安装Qt5 在树莓派4B安装完最新的64位系统bullseye后,想安装Qt5,直接使用 sudo apt-get install qt5-default 这条 ...

  6. 关于树莓派4B安装桌面控件wbar和conky解决报错的一种方案

    1.前言 首先,需要注意到wbar和conky的功能分别主要是用来美化桌面和查看CPU温度与内存占用,但是在安装的过程中,我遇到了安装失败的问题,在翻阅了一些资料后发现是由于链接失效所导致的安装失败, ...

  7. 换用国内apt源解决树莓派安装ubuntu后apt-get速度慢的问题

    最近两代树莓派变化 手里有两块树莓派 一块raspberry pi 3b 购于大四毕业前夕,做毕业设计用的 一块raspberry pi 3b+ 公司买来学习研究的 3b+和3b相比,主要部件变化不大 ...

  8. 手把手带你入坑树莓派(3B+)之第三篇,安装Qt5

    上一篇(https://blog.csdn.net/Smile_h_ahaha/article/details/84997214)说到如何安装和使用Putty与VNC,相当于你有了笔记本电脑,安装了系 ...

  9. 麒麟系统开发笔记(二):国产麒麟系统搭建Qt开发环境安装Qt5.12

    若该文为原创文章,转载请注明原文出处 本文章博客地址:https://hpzwl.blog.csdn.net/article/details/123840699 红胖子(红模仿)的博文大全:开发技术集 ...

  10. 【Qt】在ubuntu14.04上安装Qt5.12(失败)

    注意 在ubuntu14.04上安装Qt5.12最终失败了,Qt5.12需要的libdbus库的版本和ubuntu14.04中的不一致,如果强行升级libdbus库版本,会导致系统桌面无法启动. 再次 ...

最新文章

  1. linux 系统调用 read,write和lseek 使用
  2. 人工智能技术给教育行业带来哪些主要影响?
  3. 英雄传说服务器维护中,英雄传说:星之轨迹 正统《轨迹》手游无法连接服务器是什么原因...
  4. VTK:Utilities之WindowModifiedEvent
  5. 使用Pitcher简化卫语句
  6. 日照华软游戏开发价格_开发区将是未来刚需人群的首选!
  7. JavaScript | 演示函数中按值调用的示例
  8. python如何合并两个字典
  9. c语言学习-编写递归函数用于计算n!
  10. 记一次线上Zabbix对Redis监控实录
  11. JavaScript的7个位运算符
  12. pythonATM,购物车项目实战_补充1-结构图
  13. 【ubantu18.04 有线网络驱动安装 r8215-9.007.01】
  14. python控制excel打印_python对excel表格的操作
  15. pikachu靶场学习1
  16. 51Ditu开放了地图服务API接口
  17. u盘读不出来怎么修复?可以试试这个方法
  18. tp6动态连接数据库
  19. 图像处理与计算机视觉-论文阅读笔记
  20. ESP32设备驱动-ADXL345三轴加速计驱动

热门文章

  1. 秩和比RSR法算法C语言,论文:应用EXCEL实现秩和比法的计算及其评价-中大网校论文网...
  2. pjsip 录音生成wav文件声音一直很小
  3. Python编程的例子----股票数据接口
  4. win11配置jdk环境变量
  5. 新书推荐——Windows Server系统配置与管理项目化教程(Windows Server2016微课版)
  6. Bootstrap 按钮的使用
  7. 在Cocos2d-x中使用CocosBuilder
  8. 印尼语翻译和爪哇翻译一次争斗为自定义
  9. 制作WIN_XP无人值守光盘
  10. 视频APP软件开发功能架构