Raspbian で python-dev がインストールできなかった

[最終更新] 2017年2月21日

恐らく一時的な症状なのですが。Raspbian 上で apt-get により python-dev をインストールしようとしたら、できなかったという話。以前インストールしたときは、すんなりといったのですが。

$ sudo apt-get install python-dev

実行すると、ミラーサイトのエラーが出ました。具体的には下のような。

pi@raspberrypi ~/ $ sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libexpat1-dev libssl-dev libssl-doc python2.7-dev
The following NEW packages will be installed:
libexpat1-dev libssl-dev libssl-doc python-dev python2.7-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,921 kB/31.6 MB of archives.
After this operation, 42.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libexpat1-dev armhf 2.1.0-1+deb7u1
404  Not Found
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libssl-dev armhf 1.0.1e-2+rvt+deb7u16
404  Not Found
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libssl-doc all 1.0.1e-2+rvt+deb7u16
404  Not Found
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/e/expat/libexpat1-dev_2.1.0-1+deb7u1_armhf.deb  404  Not Found
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/o/openssl/libssl-dev_1.0.1e-2+rvt+deb7u16_armhf.deb  404  Not Found
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/o/openssl/libssl-doc_1.0.1e-2+rvt+deb7u16_all.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

うーん、ミラーサイトが404だよと言われているように思えます。そんなことはないと思うのですが。「Raspberry Pi • View topic – Unable to install python-dev」でも同様の症状が。そこでは /etc/apt/sources.list の一行目を以下のように書いた後、sudo apt-get update してもう一度 sudo apt-get install python-dev したらできた、という報告がありました。

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

それで私も同じようにやってみようとしたのですが、私の場合どう見ても既に書かれています。一言一句同じに見える。しかしながら他にできることもなかったので、いったん元の行を削除して、上の一行を挿入しました。そして update して、再度インストールすると…出来てしまいました。ううん?

まぁうまくいったからよいといえばよいのですが、なんだかもやもや感が残ります。果たしてこの作業により直ったのかどうか、あまり釈然としませんが、メモとして残します。

関連記事

Raspberry Pi の記事

Python の記事

スポンサーリンク

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です