create account

生命在于折腾:解决香蕉派M3无法更新的问题 by oflyhigh

View this thread on: hive.blogpeakd.comecency.com
· @oflyhigh ·
$122.19
生命在于折腾:解决香蕉派M3无法更新的问题
之前文章中说到我用于监控网络应用的报警器死翘翘了,难怪最近没报警,再考虑要不要再弄个监控报警器的报警器?😀当然了,这是一句玩笑话,其实大多数故障都可以通过重启大法解决的。


![image.png](https://images.hive.blog/DQmPUiuMp4hXUMor7JcBqSoH87g5PqRTSsiKC8HR596eFgm/image.png)
(图源 :[网页截图](http://www.banana-pi.org/m3.html))

我这个监控设备使用的是香蕉派(Banana Pi)M3,因为已经死机了,所以肯定没法通过`sudo reboot`重启了,断然拔掉电源线再重新插上,看着设备上电源灯亮起来,顺利暴力启动。

然后通过SSH登录上去,第一件事,习惯性地更新一下系统,第一个命令当然是:
>`sudo apt update`

然后麻烦来了,我得到一堆错误信息:
>![image.png](https://images.hive.blog/DQmVAXfhABWFQ22LAXaEdGmjRPfVF2oReTvBTd8FDqANtWH/image.png)

更细节的信息类似这样:
>W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/main/binary-armhf/Packages  404  Not Found [IP: 93.93.128.193 80]

以及:
>E: Some index files failed to download. They have been ignored, or old ones used instead.

虽然我其实对404错误很熟悉,就是请求的资源在服务器上不存在嘛,我第一个想到的就是软件源的问题,然而还是随手上网搜索了一下相关错误,发现很多人说通过更改DNS解析解决了这个问题。

那我就试试呗,于是折腾了一通修改DNS啥的,结果当然是做了无用功,想想也是,又不是找不到IP,而是找不到指定的资源,和DNS能有啥关系呢?

接下来我想到的办法是更新软件源,比如说使用浙大、清华、东软的镜像。
>`sudo vi /etc/apt/sources.list`

将:
>`deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi`

切换成:
>`deb http://mirrors.zju.edu.cn/raspbian/raspbian/raspbian/ jessie main contrib non-free rpi`

结果还是类似上述错误,只不过域名和IP换成浙大镜像对应的而已,比如说:
>W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/dists/jessie/main/binary-armhf/Packages  404  Not Found [IP: 101.6.15.130 80]

我试着直接访问上述链接,得到如下提示界面:
>![image.png](https://images.hive.blog/DQmRgTZ88Vjg4x1FP7vAcshzQ42TnTGPLnEdAjVZCq2SMeH/image.png)

不得不说,这个404页面做得挺皮的。不过不管皮不皮,说明我要的资源是不存在的。然后我想了一下,***大概是是系统太旧了,软件源或者镜像软件源都不提供更新啦***。

可是看着一堆错误很是闹心啊,强迫症表示受不了,于是乎继续查找方案,还别说,被我找到这样一篇文章:
>[legacy materials moving from archive.raspbian.org to legacy.raspbian.org](https://www.raspberrypi.org/forums/viewtopic.php?t=237469)

文章中,在[Thu Apr 15, 2021 7:59 pm],plugwash写到:
>two years on and i've now added jessie/jessie-staging to legacy.raspbian.org . It will be removed from the regular mirrors in due course.

文章中,在[Mon Aug 23, 2021 2:04 pm],plugwash写到:
>jessie/jessie-staging have now been removed from the regular mirrors.

也就是说,在7天前,jessie的内容被从常规镜像中移除,难怪我找不到了,哎,这运气,如果早那么七八天操作,也没这个问题了。

不过好在其实4个月以前,jessie的内容就被放在legacy.raspbian.org上了,所以其实我将源设置为legacy.raspbian.org,应该就可以啦,说干就干,试试看,将源改成如下内容:
>`deb http://legacy.raspbian.org/raspbian/ jessie main contrib non-free rpi`

再次执行 `sudo apt update`,一切顺利,不过执行`sudo apt upgrade`发现并没有安装啥更新,也是这个系统都已经过了生命期了,早就不提供更新了,而且估计我以前也更新过。

所以正确的做法应该是升级到新的系统,想想升级新系统挺麻烦的,而且当前的程序其实还能用,那就不继续折腾了(或许过段时间忍不住了会继续折腾吧)。

# 相关链接

* [legacy materials moving from archive.raspbian.org to legacy.raspbian.org](https://www.raspberrypi.org/forums/viewtopic.php?t=237469)
* http://www.raspbian.org/RaspbianMirrors
* http://www.banana-pi.org/m3.html
* http://wiki.banana-pi.org/Banana_Pi_BPI-M3#Image_Release
* http://wiki.banana-pi.org/Getting_Started_with_M3
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 97 others
properties (23)
authoroflyhigh
permlinkm3
categoryhive-105017
json_metadata{"tags":["cn","life","blog","bananapi","raspbian"],"image":["https://images.hive.blog/DQmPUiuMp4hXUMor7JcBqSoH87g5PqRTSsiKC8HR596eFgm/image.png","https://images.hive.blog/DQmVAXfhABWFQ22LAXaEdGmjRPfVF2oReTvBTd8FDqANtWH/image.png","https://images.hive.blog/DQmRgTZ88Vjg4x1FP7vAcshzQ42TnTGPLnEdAjVZCq2SMeH/image.png"],"links":["http://www.banana-pi.org/m3.html"],"app":"hiveblog/0.1","format":"markdown"}
created2021-09-02 09:36:09
last_update2021-09-02 09:36:09
depth0
children5
last_payout2021-09-09 09:36:09
cashout_time1969-12-31 23:59:59
total_payout_value61.126 HBD
curator_payout_value61.063 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,800
author_reputation6,343,284,046,781,214
root_title生命在于折腾:解决香蕉派M3无法更新的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,962,409
net_rshares104,647,598,303,038
author_curate_reward""
vote details (161)
@celeste413 ·
👍👍O哥经常幽他一默
properties (22)
authorceleste413
permlinkre-oflyhigh-202192t184914479z
categoryhive-105017
json_metadata{"tags":["hive-105017","cn","life","blog","bananapi","raspbian"],"app":"ecency/3.0.19-mobile","format":"markdown+html"}
created2021-09-02 10:49:12
last_update2021-09-02 10:49:12
depth1
children1
last_payout2021-09-09 10:49:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation460,102,829,115,253
root_title生命在于折腾:解决香蕉派M3无法更新的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,963,506
net_rshares0
@oflyhigh ·
啊,哪里幽默啦?
properties (22)
authoroflyhigh
permlinkqz0hxp
categoryhive-105017
json_metadata{"app":"hiveblog/0.1"}
created2021-09-06 12:13:03
last_update2021-09-06 12:13:03
depth2
children0
last_payout2021-09-13 12:13:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8
author_reputation6,343,284,046,781,214
root_title生命在于折腾:解决香蕉派M3无法更新的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,056,673
net_rshares0
@lovelingling ·
大佬👍👍
properties (22)
authorlovelingling
permlinkre-oflyhigh-202192t175454893z
categoryhive-105017
json_metadata{"tags":["hive-105017","cn","life","blog","bananapi","raspbian"],"app":"ecency/3.0.19-mobile","format":"markdown+html"}
created2021-09-02 09:55:00
last_update2021-09-02 09:55:00
depth1
children0
last_payout2021-09-09 09:55:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4
author_reputation726,793,538,672,182
root_title生命在于折腾:解决香蕉派M3无法更新的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,962,649
net_rshares0
@tianli ·
O 哥这篇文章比较深奥,看不懂😂😂
properties (22)
authortianli
permlinkre-oflyhigh-202192t193025566z
categoryhive-105017
json_metadata{"tags":["cn","life","blog","bananapi","raspbian"],"app":"ecency/3.0.17-mobile","format":"markdown+html"}
created2021-09-02 11:30:24
last_update2021-09-02 11:30:24
depth1
children0
last_payout2021-09-09 11:30:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length17
author_reputation17,375,313,189,373
root_title生命在于折腾:解决香蕉派M3无法更新的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,964,130
net_rshares0
@vickyli ·
所有的文字都认识,可是组合在一起就是没明白。0哥厉害了!
properties (22)
authorvickyli
permlinkre-oflyhigh-202192t20459969z
categoryhive-105017
json_metadata{"tags":["cn","life","blog","bananapi","raspbian"],"app":"ecency/3.0.18-mobile","format":"markdown+html"}
created2021-09-02 12:05:12
last_update2021-09-02 12:05:12
depth1
children0
last_payout2021-09-09 12:05:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length28
author_reputation169,153,521,247,308
root_title生命在于折腾:解决香蕉派M3无法更新的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,964,758
net_rshares0