我已经将Debian安装在Beagle上。我一直在遵循这个网页上列出的步骤:https://learn.adafruit.com/character-lcd-with-raspberry-pi-or-beaglebone-black/usage。我能够到达安装点和命令“sudo Adafruit_BBIO”。但是,在运行此命令之后,它最终会出错,声明:
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-gkkzPQ/Adafruit-BBIO/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-9dhrYO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-gkkzPQ/Adafruit-BBIO
Storing debug log for failure in /root/.pip/pip.log我无法克服这个问题,我希望这里的人能为我指出解决这个问题的正确方向。通过尝试运行其中一个示例,我确实执行了某种“测试”。在修改它以匹配我的16x2 HD44780液晶显示器的HD44780配置之后,它在运行时返回如下内容:
debian@beaglebone:~/Adafruit_Python_CharLCD/examples$ python char_lcd.py
Traceback (most recent call last):
File "char_lcd.py", line 6, in <module>
import Adafruit_CharLCD as LCD
File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/__init__.py", line 1, in <module>
File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 89, in <module>
File "build/bdist.linux-armv7l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 95, in Adafruit_CharLCD
File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 321, in get_platform_gpio
ImportError: No module named Adafruit_BBIO.GPIO/root/..pip/pip.log的内容在这里http://pastebin.com/atsCp6xu
发布于 2015-05-03 06:42:08
这个问题在日志的第202行中清楚地显示出来。
source/common.c:385:5: error: format not a string literal and no format argumes [-Werror=format-security]
fprintf(file, name);
^编译器发现了一个不安全的构造,即在没有格式的情况下将字符串传递给printf。对此有两个解决方案,要么告诉编译器这不是问题,要么修复它。
fprintf(file, "%s", name);还有其他的警告也可能需要注意,并且在这个错误被解决后可能会出现其他的错误。
https://unix.stackexchange.com/questions/200072
复制相似问题