为什么会出现“警告:存储库'oss_update'已过时。考虑使用其他镜像或服务器。”?


13

在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日更新,因此它们似乎已过时。

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

Answers:


14

我从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

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

cat /etc/os-release

对于openSuse 42.2不起作用
rohitsakala

1
@rohitsakala您只需要在任何文本编辑器中将链接从42.3更改为42.2,然后使用这些链接即可。
mtelesha

在我的情况下,我还需要更改zypper mr -p 99 reponame1 reponame2 reponameN 某些存储库的优先级():对于某些自定义存储库,其优先级较高,而对于默认存储库的优先级较低,以便解析所需的正确软件包。
卡马菲瑟(Kamafeather)

请注意,对于版本15.0,您不希望oss存储库的最后一个URL段(即删除“ suse /”)。
jciloa

3

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

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
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.