yukの技術ブログ

インフラやプログラミングなど技術系を中心に記載するブログです!

apt-getで404 not foundになるときの対処方法

raspberry pi 3でapt-get installしようとして以下404のエラーメッセージが出たときは、、、、

pi@raspberrypi:~/google-home-notifier $ sudo apt-get install -y npm
:
:
Suggested packages:
  node-hawk node-aws-sign node-oauth-sign node-http-signature
The following NEW packages will be installed:
  gyp libc-ares-dev libjs-node-uuid libssl-dev libssl-doc libv8-3.14-dev
  node-abbrev node-ansi node-ansi-color-table node-archy node-async
  node-block-stream node-combined-stream node-cookie-jar node-delayed-stream
  node-forever-agent node-form-data node-fstream node-fstream-ignore
  node-github-url-from-git node-glob node-graceful-fs node-gyp node-inherits
  node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime
  node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
  node-normalize-package-data node-npmlog node-once node-osenv node-qs
  node-read node-read-package-json node-request node-retry node-rimraf
  node-sha node-sigmund node-slide node-tar node-tunnel-agent node-underscore
  node-which nodejs-dev npm
0 upgraded, 53 newly installed, 0 to remove and 22 not upgraded.
Need to get 2,394 kB/3,676 kB of archives.
After this operation, 13.2 MB of additional disk space will be used.
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main libssl-dev armhf 1.0.1t-1+deb8u6
  404  Not Found [IP: 93.93.128.193 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main libssl-doc all 1.0.1t-1+deb8u6
  404  Not Found [IP: 93.93.128.193 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main libc-ares-dev armhf 1.10.0-2+deb8u1
  404  Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/o/openssl/libssl-dev_1.0.1t-1+deb8u6_armhf.deb  404  Not Found [IP: 93.93.128.193 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/o/openssl/libssl-doc_1.0.1t-1+deb8u6_all.deb  404  Not Found [IP: 93.93.128.193 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/c/c-ares/libc-ares-dev_1.10.0-2+deb8u1_armhf.deb  404  Not Found [IP: 93.93.128.193 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


apt-get update でパッケージリストの更新を実施すれば解決することもあります!
インターネットには繋がっているのに、apt-getで404 not foundになる場合は、試してみてください~。

sudo apt-get update