Upgrading LibreOffice includes (automatic, internal) uninstallation of an existing older version (after its install state was read to select what to upgrade). The uninstall itself requires the original installation database (msi) for old version to be available. Usually, Windows caches such databases (or at least portions required for removal) in a subdirectory of Windows directory. This allows the uninstallation in case the original msi is unavailable.
Though, sometimes the cache gets corrupted (either because of user actions, like “cleaning” drives/registry etc, or because of system errors). In this case, the cached database for older version may either be corrupted or absent at all.
First thing to try in this case is simply to download the necessary msi - we keep all released versions in our download archive.
Sometimes this doesn’t help, because not only database is missing, but also Windows Installer registry information is corrupted. In this case, Microsoft offers a tool to automatically fix Windows Installer problems (along with a troubleshooter).