Debian Lenny Adafruit_BBIOのインストールに失敗しました

Debian Lenny Adafruit_BBIOのインストールに失敗しました

Beagle Bone Black Rev BにDebian Lennyをインストールしました。私はこのWebページで提供されているおおよそのステップに従いました。https://learn.adafruit.com/character-lcd-with-raspberry-pi-or-beaglebone-black/usage。インストールポイントに達して、「sudo pip install 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

私はこの問題を克服することはできません。ここで誰かがこの問題を解決するための正しい方向を教えてくれることを願っています。私は例の1つを実行して、一種の「テスト」を実行しました。 16x2 HD44780 LCD の BeagleBoards 構成と一致するように変更し、実行時に以下を返します。

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

ベストアンサー1

ログの202行目に問題が明確に表示されます。

source/common.c:385:5: error: format not a string literal and no format argumes [-Werror=format-security]

     fprintf(file, name);

     ^

コンパイラは、フォーマットされていない文字列をprintfに渡す安全でない構文を見つけました。これには2つの解決策があります。コンパイラにこれが問題ではないことを知らせるか修正することです。

fprintf(file, "%s", name);

注意が必要な他の警告もあり、この問題を解決した後に他のエラーが表示されることがあります。

おすすめ記事