takuocean’s diary

備忘録がメインなので、説明が足りないことも多い。もう少し詳しくという人はコメントをお願いします。

ラズパイでThe bug is not reproducible, so it is likely a hardware or OS problemと言われた

Rapbianにpyenvを使ってpython3.4.3をインストールしようとしたらエラーが出てきた。

pi@raspberrypi:~$ pyenv install 3.4.3                                                                                                                                                
Downloading Python-3.4.3.tar.xz...                                                                                                                                                   
-> https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
Installing Python-3.4.3...

BUILD FAILED (Raspbian 8.0 using python-build 1.0.10-16-g30212f0)

Inspect or clean up the working tree at /tmp/python-build.20170503005235.1237
Results logged to /tmp/python-build.20170503005235.1237.log

Last 10 log lines:
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -Werror=declaration-after-statement   -I. -IInclude -I./Include -I/home/pi/.pyenv/versions/3.
4.3/include  -I/home/pi/.pyenv/versions/3.4.3/include   -DPy_BUILD_CORE -o Python/bltinmodule.o Python/bltinmodule.c
gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -Werror=declaration-after-statement   -I. -IInclude -I./Include -I/home/pi/.pyenv/versions/3.
4.3/include  -I/home/pi/.pyenv/versions/3.4.3/include   -DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c
gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -Werror=declaration-after-statement   -I. -IInclude -I./Include -I/home/pi/.pyenv/versions/3.
4.3/include  -I/home/pi/.pyenv/versions/3.4.3/include   -DPy_BUILD_CORE -o Python/compile.o Python/compile.c
The bug is not reproducible, so it is likely a hardware or OS problem.
Makefile:1487: recipe for target 'Python/Python-ast.o' failed
make: *** [Python/Python-ast.o] Error 1
make: *** Waiting for unfinished jobs....

解決策(?)

以下のようにカーネルとファームをアップデートをしたらうまくインストールできるようになった。

sudo apt-get dist-upgrade
sudo rpi-update