3
3

More than 1 year has passed since last update.

apt-get update時のエラーメモ

Last updated at Posted at 2023-02-13

概要

過去にバックアップしたイメージをSDに再インストールした場合、正しくパッケージのアップデートができなかったです。
この問題について解決方法のメモです。

事前準備

Raspberry PIにインストールしたSDカードのイメージをバックアップしてから1年以上経過したイメージをSDカードに再度インストールします。

パッケージアップデート

下記のコマンドをコンソールで実行します。

■コマンド
sudo apt-get update

■実行結果
以下のようにエラーメッセージが表示されます。

pi@raspberrypi:~ $ sudo apt-get update
Hit:1 https://linux.teamviewer.com/deb stable InRelease                        
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]         
Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]      
Reading package lists... Done                                                  
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

エラー解決方法

上記のように「Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'」エラーが表示された場合、下記のコマンドを実行します。

■コマンド
sudo apt-get update --allow-releaseinfo-change

■実行結果
pi@raspberrypi:~ $ sudo apt-get update --allow-releaseinfo-change
Hit:1 https://linux.teamviewer.com/deb stable InRelease
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:4 http://archive.raspberrypi.org/debian buster/main armhf Packages [392 kB]
Get:5 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:6 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [58.8 kB]
Get:7 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [104 kB]
Fetched 13.6 MB in 34s (399 kB/s)
Reading package lists... Done
N: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
N: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

パッケージをアップデート

下記のコマンドで再度パッケージをアップデートしてみたら正常にパッケージがアップデートできました。

■コマンド
sudo apt-get update

■実行結果

pi@raspberrypi:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease                                                          
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease                                                       
Hit:3 https://linux.teamviewer.com/deb stable InRelease      
Reading package lists... Done                         
pi@raspberrypi:~ $ 

OSのバージョンを上げる

OSのバージョンを上げるためには下記のコマンドを実行します。

■コマンド
sudo apt-get dist-upgrade

■実行結果
完了まで1~2時間以上かかりました。>。<

pi@raspberrypi:~ $ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
...
...
...
After this operation, 1,613 MB of additional disk space will be used.
Do you want to continue [Y/n]?
...
...
...
Get:464 http://archive.raspberrypi.org/debian buster/main armhf rpi-eeprom armhf 16.0-1~buster [2,337 kB]                                                                   
Get:465 http://archive.raspberrypi.org/debian buster/main armhf rpi-eeprom-images armhf 16.0-1~buster [11.1 kB]                                                             
Get:466 http://archive.raspberrypi.org/debian buster/main armhf rpi-update all 20210618 [7,920 B]                                                                           
Get:467 http://archive.raspberrypi.org/debian buster/main armhf scratch2 all 0.26 [6,908 B]                                                                                 
Get:468 http://archive.raspberrypi.org/debian buster/main armhf sense-emu-tools all 1.2-1 [70.2 kB]                                                                         
Get:469 http://archive.raspberrypi.org/debian buster/main armhf thonny all 3.3.10-1+rpt1 [788 kB]                                                                           
Get:470 http://archive.raspberrypi.org/debian buster/main armhf vlc-plugin-notify armhf 3.0.17.4-0+deb10u2+rpt1 [128 kB]                                                    
Get:471 http://archive.raspberrypi.org/debian buster/main armhf vlc-plugin-samba armhf 3.0.17.4-0+deb10u2+rpt1 [129 kB]                                                     
Get:472 http://archive.raspberrypi.org/debian buster/main armhf vlc-plugin-video-splitter armhf 3.0.17.4-0+deb10u2+rpt1 [142 kB]                                            
Get:473 http://archive.raspberrypi.org/debian buster/main armhf vlc-plugin-visualization armhf 3.0.17.4-0+deb10u2+rpt1 [143 kB]                                             
Get:474 http://archive.raspberrypi.org/debian buster/main armhf scratch3 armhf 1.0.6 [121 MB]                                                                               
Fetched 1,613 MB in 4min 40s (5,751 kB/s)                                                                                                                                   
Reading changelogs... Done
...
...
...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for gnome-icon-theme (3.12.0-3) ...
Processing triggers for libgdk-pixbuf2.0-0:armhf (2.38.1+dfsg-1) ...
Processing triggers for shared-mime-info (1.10-1) ...
Processing triggers for install-info (6.5.0.dfsg.1-4+b1) ...
Processing triggers for fontconfig (2.13.1-2) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for initramfs-tools (0.133+deb10u1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for dictionaries-common (1.28.1) ...
Processing triggers for ca-certificates (20200601~deb10u2) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
done.
Processing triggers for libvlc-bin:armhf (3.0.17.4-0+deb10u2+rpt1) ...
pi@raspberrypi:~ $ 

終わりに

元々良く使っていたRaspberry PI 3B+を利用していましたが、ある日から起動されなくなりました。
それでこの前にダウンロードしてたイメージをSDにインストールしましたが、なぜか正しく起動されなかったです。
まさかRPIの本体が壊れたか?と思いましたが、起動する際に表示されるロゴは問題なく表示できますが、デスクトップの画面が表示されないです。
もしOSバージョンの問題?と思って過去にバックアップしてたイメージをインストールしたら問題なく使えるようになりました。
次は起動されないSDカードから復元可能なものを調べてみます。

3
3
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
3