为什么我收到“警告:存储库‘oss_update’似乎已过时。请考虑使用不同的镜像或服务器。”?

为什么我收到“警告:存储库‘oss_update’似乎已过时。请考虑使用不同的镜像或服务器。”?

在 WSL 上,我执行了sudo zypper update,但收到此错误消息。

正在加载存储库数据...
警告:存储库“oss_update”似乎已过时。考虑使用不同的镜像或服务器。
读取已安装的包...

没事做。

但是,当我执行时sudo zypper refresh,我没有收到任何错误消息。

Retrieving repository 'The Go Programming Language (openSUSE_Leap_42.3)' metadata ...............................................................................................................................................[done]
Retrieving repository 'devel:languages:php (openSUSE_Leap_42.3)' metadata .......................................................................................................................................................[done]
Repository 'oss' is up to date.
Retrieving repository 'oss_update' metadata .....................................................................................................................................................................................[done]
Retrieving repository 'PHP7 extensions (php7_openSUSE_Leap_42.3)' metadata ......................................................................................................................................................[done]
All repositories have been refreshed

我检查了我正在使用的存储库列表zypper lr -u

# | Alias                      | Name                                             | Enabled | GPG Check | Refresh | URI
--+----------------------------+--------------------------------------------------+---------+-----------+---------+-------------------------------------------------------------------------------------------------
1 | devel_languages_go         | The Go Programming Language (openSUSE_Leap_42.3) | Yes     | (r ) Yes  | No      | http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Leap_42.3/
2 | devel_languages_php        | devel:languages:php (openSUSE_Leap_42.3)         | Yes     | (r ) Yes  | No      | http://download.opensuse.org/repositories/devel:/languages:/php/openSUSE_Leap_42.3/
3 | oss                        | oss                                              | Yes     | (r ) Yes  | No      | http://download.opensuse.org/distribution/leap/42.3/repo/oss/suse/
4 | oss_update                 | oss_update                                       | Yes     | (r ) Yes  | No      | http://download.opensuse.org/update/leap/42.3/oss/
5 | server_php_extensions_php7 | PHP7 extensions (php7_openSUSE_Leap_42.3)        | Yes     | (r ) Yes  | No      | http://download.opensuse.org/repositories/server:/php:/extensions:/php7/php7_openSUSE_Leap_42.3/

当我检查内容时http://download.opensuse.org/update/leap/42.3/oss/,我看到文件和目录已于 2018 年 3 月 23 日更新,因此它们看起来并没有过时。

为什么我收到有关存储库已过时的错误消息?如何更改我正在使用的存储库?我应该用什么?

答案1

我找到了答案https://www.reddit.com/r/bashonubuntuonwindows/comments/8fcbs5/update_of_opensuse_on_wsl_error/:您需要将存储库 URI 从 HTTP 更改为 HTTPS。我刚刚这样做了,并且能够看到新的软件包。我只有 oss 和 oss_update 存储库,所以我遵循的过程是:

sudo zypper rr oss
sudo zypper rr oss_update
sudo zypper ar https://download.opensuse.org/distribution/leap/42.3/repo/oss/suse/ oss
sudo zypper ar https://download.opensuse.org/update/leap/42.3/oss/ oss_update

sudo zypper ref
sudo zypper up

为了确保这适用于您的版本,请找到您系统的版本号,并将其替换为上述 URL 中的42.3. (您可以通过在浏览器中打开 URL 来确保它们有效。)您可以在以下命令的输出中看到版本号:

cat /etc/os-release

答案2

对于 Leap 15.0 删除(从分发链接中使用 suse/):

sudo zypper rr oss
sudo zypper rr oss_update

sudo zypper ar https://download.opensuse.org/distribution/leap/15.0/repo/oss/ oss
sudo zypper ar https://download.opensuse.org/update/leap/15.0/oss/ oss_update

sudo zypper ref
sudo zypper up

相关内容