參考https://blog.csdn.net/iteye_21199/article/details/82230824的解決方法,並未解決
遇到新的問題:
W: The repository 'http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian wheezy Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian wheezy-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian wheezy/updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/dists/wheezy/contrib/source/Sources 404 Not Found [IP: 101.6.8.193 80]
E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/dists/wheezy-updates/non-free/source/Sources 404 Not Found [IP: 101.6.8.193 80]
E: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/dists/wheezy/updates/contrib/source/Sources 404 Not Found [IP: 101.6.8.193 80]
E: Some index files failed to download. They have been ignored, or old ones used instead
解決方法:
1.查看當前系統內核版本
輸入命令lsb_release -a
得到結果
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.4 (stretch)
Release: 9.4
Codename: stretch
可以看到我當前系統內核版本爲9.4
查看下面的使用幫助
清華Raspbian 鏡像使用幫助
找到對應內核版本的源
Debian 7
# 編輯 `/etc/apt/sources.list` 文件,刪除原文件所有內容,用以下內容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main non-free contrib
# 編輯 `/etc/apt/sources.list.d/raspi.list` 文件,刪除原文件所有內容,用以下內容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ wheezy main
Debian 8
# 編輯 `/etc/apt/sources.list` 文件,刪除原文件所有內容,用以下內容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib
# 編輯 `/etc/apt/sources.list.d/raspi.list` 文件,刪除原文件所有內容,用以下內容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ jessie main
Debian 9
# 編輯 `/etc/apt/sources.list` 文件,刪除原文件所有內容,用以下內容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main non-free contrib
# 編輯 `/etc/apt/sources.list.d/raspi.list` 文件,刪除原文件所有內容,用以下內容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ stretch main
- 注意:網址末尾的raspbian重複兩次是必須的。因爲Raspbian的倉庫中除了APT軟件源還包含其他代碼。APT軟件源不在倉庫的根目錄,而在raspbian/子目錄下。
編輯鏡像站後,請使用sudo apt-get update
命令,更新軟件源列表,同時檢查您的編輯是否正確
Get:1 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch InRelease [15.0 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/raspberrypi stretch InRelease [25.4 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main Sources [9,719 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/contrib Sources [75.2 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/non-free Sources [125 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf Packages [11.7 MB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/non-free armhf Packages [95.5 kB]
Get:8 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/contrib armhf Packages [56.9 kB]
Get:9 http://mirrors.tuna.tsinghua.edu.cn/raspberrypi stretch/main armhf Packages [221 kB]
Fetched 22.0 MB in 13s (1,574 kB/s)
Reading package lists...