树莓派源文件遇到的问题(2019.7.4)

参考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... 

更新源成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章