18

On WSL, I executed sudo zypper update, but I got this error message.

Loading repository data...
Warning: Repository 'oss_update' appears to be outdated. Consider using a different mirror or server.
Reading installed packages...

Nothing to do.

When I executed sudo zypper refresh, I didn't get any error message, though.

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

I checked the list of the repository I am using with 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/

When I check the content of http://download.opensuse.org/update/leap/42.3/oss/, I see the files and the directories have been updated on March 23, 2018, so they don't seem obsolete.

Why am I getting that error message about the repository being outdated? How do I change the repository I am using? What should I use?

apaderno
  • 823
  • 2
  • 9
  • 25

2 Answers2

17

I found the answer from https://www.reddit.com/r/bashonubuntuonwindows/comments/8fcbs5/update_of_opensuse_on_wsl_error/ : you need to change the repository URIs from HTTP to HTTPS. I just did that and was able to see new packages. I only had the oss and oss_update repositories, so the process I followed was:

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

To make sure this works for your version, find the version number of your system, and substitute it into the above URLs in the place of 42.3. (You can make sure the URLs are valid by opening them in a browser.) You can see the version number in the output of the following command:

cat /etc/os-release
jciloa
  • 131
  • 5
BCran
  • 286
  • 2
  • 4
  • In my case I also needed to change the priority (`zypper mr -p 99 reponame1 reponame2 reponameN `) of some repos: higher for some custom ones and lower for the default ones, in order to resolve the correct packages that I needed. – Kamafeather Sep 05 '19 at 12:38
  • sudo zypper ar https://download.opensuse.org/distribution/openSUSE-current/repo/oss oss – Sergei Krivonos Oct 05 '20 at 13:05
4

For Leap 15.0 remove (suse/ from distribution link):

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
jelle Kake
  • 41
  • 1