Ubuntu12.04な環境です。
2.7.10をビルドしようとすると、いくつかライブラリがないと怒られたのでした。
% pyenv install 2.7.10 Downloading Python-2.7.10.tgz... -> https://yyuu.github.io/pythons/eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a Installing Python-2.7.10... Ignoring potentially dangerous file name ../Python-2.7.10/Lib/site.py patching file ./Lib/site.py WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib? Installed Python-2.7.10 to /home/masasuzu/.anyenv/envs/pyenv/versions/2.7.10
dev用のパッケージがいくつかたりないパターンなのでbz2とreadlineをここで入れる。
sudo aptitude update
sudo aptitude install libbz2-dev libreadline-dev
※今回はすでに入っていて怒られてないけどたぶんlibssl-devも必要かも
再度実行すると、warningが無くなってめでたしめでたし
% pyenv install 2.7.10 pyenv: /home/masashi/.anyenv/envs/pyenv/versions/2.7.10 already exists continue with installation? (y/N) y Downloading Python-2.7.10.tgz... -> https://yyuu.github.io/pythons/eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a Installing Python-2.7.10... Ignoring potentially dangerous file name ../Python-2.7.10/Lib/site.py patching file ./Lib/site.py Installed Python-2.7.10 to /home/masasuzu/.anyenv/envs/pyenv/versions/2.7.10