OpenWrt的opkg update失败解决办法

Problem: opkg update failed

For example:

root@OpenWrt:~# opkg update Downloading https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/Packages.gz *** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz *** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz

Collected erro

Answer: OpenWrt changed the update from opkg to apk, so the corresponding file was not found when the file was updated.

Solution:

  1. Recompile the source code by yourself and add the apk software management plug-in to obtain the official new updated source package. Or look for a compiled image with an apk.

  2. Replace the source method.
    According to the OpenWrt’s official website, we source can be replaced with Index of /releases/24.10-SNAPSHOT/targets/

image

We’ll use the OpenWrt One board as an example, but other boards can be used in the same way.

Let’s try opkg update first.

At this point, we open the source change website and use the screenshot above to find the corresponding source address.
Index of (root) / releases / 24.10-SNAPSHOT / targets / mediatek / filogic / then packages are at the bottom of the site.
The corresponding link is:https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/mediatek/filogic/packages。

Another link can be found in the same way:https://downloads.openwrt.org/releases/24.10-SNAPSHOT/packages/aarch64_cortex-a53/base。

Open serial debugging in OpenWrt One,Use

vim /etc/opkg.distfeeds.conf


In this file, change to the corresponding source address, save, and exit.

update was performed again, and it was found that the digital signature did not pass.

In this case, you can remove the option to check the digital signature in /etc/opkg.conf.

vim /etc/opkg.conf

image

Then the opkg update is performed.

The above changes can also be modified on the web.

Connect the board Lan port to the computer with the network cable, and then access 192.168.1.1. Open the Software screen and click Configure opkg…

update operations are also available in this screen.

The same can be done here to modify the corresponding file.
image

这是中文翻译。
root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/Packages.gz

Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/Packages.gz

Collected erro

原因:由于OpenWrt官方将更新源从opkg更新换成了apk,所以导致文件更新时没有找到对应文件。

解决方法:

1、自行重新编译源码,增加apk软件管理插件,以便获取官方的新更新源包。或者寻找已经编译好有apk的镜像。

2、更换源方法。

根据OpenWrt官网所说,我们可以将源替换成https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets

这里以OpenWrt One板为例子,其他板也同理使用。

首先尝试一下opkg update更新。

这时我们打开更换源的网站,依据上面的截图找到对应的源地址。

Index of (root) / releases / 24.10-SNAPSHOT / targets / mediatek / filogic /的packages在网站的下方位置。

对应的链接就是: https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/mediatek/filogic/packages

另一个链接同理也可以找到: https://downloads.openwrt.org/releases/24.10-SNAPSHOT/packages/aarch64_cortex-a53/base

在OpenWrt One打开串口调试,

使用vim /etc/opkg/distfeeds.conf

在这个文件中更改为对应的源地址,保存并退出。

再次进行update,发现是数字签名没有通过。


这时可以在/etc/opkg.conf文件将检查数字签名的选项删除。

image

然后进行opkg update。

上述更改也可以在web进行修改。

用网线将板子Lan口与电脑连接,然后访问192.168.1.1。打开Software界面,点击Configure opkg…

在这个界面也可以进行update的操作。


在这里面同理也可以修改对应文件。
image