Zypper dup, installation has completed with an error, couldn't download file, fixed by zypper refresh

I recently ran zypper dup to update my system, and there was one package that just wouldn’t download, so I hit “i” to ignore. All the other files downloaded okay, but then zypper would not continue with the installation, said “installation has completed with an error”. So, then I tried updating the system using Discover, and Discover failed too because it couldn’t download that file. Something about libmpeg2convert. Thing is, when I went to look in Discover for that installed file, to possibly remove it, it didn’t show up in the list of installed files - frustrating and annoying!

After looking at 45 Zypper Commands to Manage 'Suse' Linux Package Management
I saw that there was a “zypper refresh” command, and so it did something with refreshing the VLC repositories, and then when I ran “zypper dup” again, the problem file was downloaded and the process was able to carry on and complete, just in case anyone cares to know. :slight_smile:

Do you have witched off automatic refresh for some repos?

Refresh should take place automatically when the last refresh was done more then a certain timespan ago (at the most some hours, but I think even less by default). Thus in by far the majority of cases a separate zypper ref is not needed (although I see many do this before almost every zypper command they execute, when not needed, it does not hurt).

Except of course when the automatic refresh is switched off :wink: .

I just use whatever options zypper came with. It’s something with zypper that should be fixed, that when it can’t download a file, try refreshing the repos and try that file(s) again. I didn’t turn on or off automatic refreshing.

What I’d like to learn is how to make zypper download all the files first and then do an offline install.

You can increase the retries count from the default:

# grep silent zypp.conf
 download.max_silent_tries = 8
#

0 will cause there to be no limit. 5 is default.

If you really want to learn (as opposed to getting ready answer from someone on this forum) - start with man zypper.

You provided zero information for anyone to troubleshoot what happened. Refresh is per-repository and you did not show your repository settings.

if refresh is not enabled for a particular repository or even globally, why should zypper ignore that administrator decision?

In short the recommendations above can be token together in two advises:

start studying

man zypper

and post (as root):

zypper lr -d

User experiencing issues with zypper dist-upgrade may always want to run zypper refresh --force as a sanity check:

3400g:~ # time zypper refresh --force
Forcing raw metadata refresh
Retrieving repository 'Packman' metadata .............................................................................................................................................................................................[done]
Forcing building of repository cache
Building repository 'Packman' cache ..................................................................................................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'jalbum' metadata ..............................................................................................................................................................................................[done]
Forcing building of repository cache
Building repository 'jalbum' cache ...................................................................................................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata .........................................................................................................................................................................[done]
Forcing building of repository cache
Building repository 'openSUSE-Tumbleweed-Non-Oss' cache ..............................................................................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata .............................................................................................................................................................................[done]
Forcing building of repository cache
Building repository 'openSUSE-Tumbleweed-Oss' cache ..................................................................................................................................................................................[done]
Forcing raw metadata refresh
Retrieving repository 'openSUSE-Tumbleweed-Update' metadata ..........................................................................................................................................................................[done]
Forcing building of repository cache
Building repository 'openSUSE-Tumbleweed-Update' cache ...............................................................................................................................................................................[done]
All repositories have been refreshed.

real    0m8.614s
user    0m4.590s
sys     0m0.469s
3400g:~ # 

According to speedtest download speed is poor 7.27 Mbit/s, but the refresh executes in real 0m8.614s which is appropriate for duping the system.

In case of long refresh times users may want to postpone duping and try again after a few hours.