环境以及设备需求
1.树莓派4b 8GB
2.Ubuntu22 64位
3.安装了gcc环境
问题引出
1.使用 apt-get install wiringpi 版本为2.5,无法使用,报错代码17 Oops - unable to determine board type… model: 17
2.使用如下代码
cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
出现错误,armhf不兼容arm64(hf是32位,编译好的不能跑)
解决方案
首先在https://github.com/WiringPi/WiringPi 上拉取:
cd到你喜欢的地方
$ git clone https://github.com/WiringPi/WiringPi.git
$ ./build
即可以以源码的方式安装(记得检查gcc环境 gcc -v)
本文指导如何在树莓派4b上遇到wiringpi版本兼容性问题后,通过从GitHub源码编译解决,重点在于处理arm64与armhf架构的冲突,确保软件在Ubuntu 22.04环境下正常运行。

64

被折叠的 条评论
为什么被折叠?



