(2021年12月21日更新解决方案)

解决方法,请输入以下命令:

export CFLAGS=-fcommon
pip3 install RPi.GPIO

前提

树莓派 3b
Mac 电脑连接
树莓派系统 Lite os
Python 3.9

问题

使用 python 创建了虚拟环境。
然后在虚拟环境中安装 RPi.GPIO 时候,
出现报错:

error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1

网上的解决方案都尝试了,没有效果,比如以下这几种:

sudo apt-get install python-dev
sudo apt-get install libevent-dev
sudo apt-get install python3-dev
sudo apt-get install python-scipy
sudo apt-get install build-essential
sudo apt-get install libssl-dev libffi-dev

怀疑是 python 版本问题
尝试了删除 python 3.9 换成 python 3.6 依然不行

最后只能放弃在虚拟环境安装 RPi.GPIO
直接使用原系统,树莓派原系统中已经自带了 RPi.GPIO 包
使用:

pip3 list

可以查看到,当前最新版本是 0.7.0

接下去安装了依赖于 RPi.GPIO 的两个包:
adafruit-circuitpython-motor
adafruit-circuitpython-pca9685
都成功完成

~~以上问题已经解决,请见本文开头~~
~~以上问题已经解决,请见本文开头~~
~~以上问题已经解决,请见本文开头~~

【树莓派】error: command ‘/usr/bin/arm-linux-gnueabihf-gcc‘ failed with exit code 1(2021年12月)相关推荐

  1. pip install paddlepaddle 报错 command ‘/usr/bin/gcc‘ failed with exit code 1 或 command ‘gcc‘ 报错

    linux服务器部署paddle的uie时出现的问题,github已经提问 https://github.com/PaddlePaddle/PaddleNLP/issues/2193 直接以下代码,亲 ...

  2. fatal error: cusparse.h: No such file or directory compilation terminated. error: command ‘/usr/loca

    写在前面: 我是用pycharm远程连接矩池云的GPU遇到了这个问题.前面安装包都很顺利,就是最后安装maskrcnn-benchmark的时候出问题了,一直在报错 fatal error: cusp ...

  3. Could not execute auto check for display colors using command /usr/bin/xdpyinfo

    Linux上安装Oralce数据库时,往往需要调出图形界面,虽然xmanager passive已经启动,但是依旧调不出来,出现如下报错: [oracle@cdr database]$ export ...

  4. xcode编译报错unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1

    升级完xcode9.1之后,编译项目出现如下错误: CI今日构建时报出如下错误: /Users/xxx/Library/Developer/Xcode/DerivedData/Snowball-ebl ...

  5. xcodebuild构建时报错unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1

    CI今日构建时报出如下错误: /Users/xxx/Library/Developer/Xcode/DerivedData/Snowball-ebllohyukujrncbaldsfojfjxwep/ ...

  6. no identity found Command /usr/bin/codesign failed with exit code 1 报错解决方法

    no identity found Command /usr/bin/codesign failed with exit code 1 报错解决方法 参考文章: (1)no identity foun ...

  7. iOS运行错误:Command /Applications/Xcode 2.app/Contents/Developer/usr/bin/actool failed with exit code 25

    今天早上一打开电脑运行程序时突然抱Command /Applications/Xcode 2.app/Contents/Developer/usr/bin/actool failed with exi ...

  8. jenkins打包报错Failed to connect to repository : Command “/usr/bin/git ls-remote -h -- http://git.c5game

    Failed to connect to repository : Command "/usr/bin/git ls-remote -h -- http://git.c5game.com/c ...

  9. xcode升级运行报错 Command /usr/bin/codesign failed with exit code 1(api打包出错)

    今天xcode从6.4升级到7.2.1最新版本之后,api打包错误,如下 查找了很多文档都没能解决问题,最后直接把证书替换了,成功运行打包. 参考文章:http://blog.csdn.net/jus ...

最新文章

  1. jhello框架-ajax
  2. 用DirectX Audio和DirectShow播放声音和音乐(1)
  3. CodeBlocks: 生成的exe文件自定义一个图标
  4. Sharepoint学习笔记—ECMAScript对象模型系列-- 7、获取和修改List的Lookup字段
  5. 3.Lucene3.x API分析,Director 索引操作目录,Document,分词器
  6. 三角形最佳路径问题(信息学奥赛一本通-T1288)
  7. leetcode 旋转数组
  8. voms下的反射大师_晓星说数学:让数学家折服的艺术大师埃舍尔
  9. 嵌入式端的神经网络算法部署和实现综合
  10. 手把手一步步用DataGridView 控件编写属于自己的日历
  11. SQL Server 计算年龄函数
  12. aac怎么转化为mp3格式?
  13. Python自学笔记————字符串
  14. Angular +Ionic实现关注与取消关注
  15. 来客码到底是干什么的?
  16. Python数据结构与算法基础|第二期:代码实现——栈的顺序存储与链式存储
  17. (九十三) Android O 连接WiFi AP流程梳理续——保存网络
  18. 冰与火之歌居然是在 DOS 系统上写出来的
  19. 预制墙板一般包括哪些类型?
  20. Windows磁盘检测——chkdsk

热门文章

  1. 比肩犀牛书的《JavaScript编程精》原书第3版(中文版)重磅来袭!文末福利
  2. golang gopacket网络抓包和分析
  3. 在线编辑Markdown数学公式(LaTex)网站链接
  4. DWA之matlab代码
  5. 【超直白讲解opencv RGB与BGR】RGB模式与BGR模式有什么不同,如何相互转换?
  6. Zemax-LED准直光斑为什么是环形
  7. wmts规范_Geoserver学习笔记-3、服务标准(WMTS详解)
  8. 南昌工学院计算机挂科率,南昌工学院的真实情况
  9. silabs GPIO的配置与应用
  10. iOS --- 识别相册中图片上的二维码