LoginSignup
3
1

More than 3 years have passed since last update.

apt updateでエラーが出た場合の対処法

Last updated at Posted at 2020-02-25

エラー内容

sudo apt updateをしようとすると以下のエラーが出るようになってしまいました。

aqua@aqua-VirtualBox:~$ sudo apt update
Hit:1 http://jp.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://jp.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:3 http://jp.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Ign:4 https://cran.rstudio.com/bin/linux/ubuntu bionic/ InRelease              
Err:5 https://cran.rstudio.com/bin/linux/ubuntu bionic/ Release                
  404  Not Found [IP: 13.35.67.113 443]
Ign:6 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:8 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease   
Hit:10 http://security.ubuntu.com/ubuntu bionic-security InRelease             
Reading package lists... Done 
E: The repository 'https://cran.rstudio.com/bin/linux/ubuntu bionic/ Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

解決方法

E: The repository 'https://cran.rstudio.com/bin/linux/ubuntu bionic/ Release' does not have a Release file.

より、R関係のパッケージが参照できていないようです。
https://cran.rstudio.com/bin/linux/ubuntu
ここにアクセスしてみると、以下の画像の通り、
bionic/
というディレクトリが存在しておらず、代わりに
bionic-cran35
というディレクトリが存在しているのが分かります。

image.png

リポジトリの参照ファイル etc/apt/sources.list の中身を見ると、以下のような記述を見つけました。

/etc/apt/sources.list
## For R package
deb https://cran.rstudio.com/bin/linux/ubuntu bionic/

R関係のパッケージは暫く使用する予定がなかったので、今回はこの記述を丸ごと削除しました。

補足

/etc/apt/sources.list
## For R package
deb https://cran.rstudio.com/bin/linux/ubuntu bionic/

ここのbionicbionic-cran35に書き換えてapt updateしてみましたが、
今度は以下のようなエラーが出て上手くいきませんでした...

W: GPG error: https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9
E: The repository 'https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/ InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1