I tried to upgrade my Raspbian on Raspberri Pi 3 from Stretch to Buster but receive this error:

➜  ~ sudo apt dist-upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up wolfram-engine (12.0.1+2019062401) ...
ln: failed to create symbolic link '/usr/share/icons/nuoveXT2/64x64/mimetypes/application-mathematica.png': File exists
dpkg: error processing package wolfram-engine (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
➜  ~ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.13 (stretch)
Release:    9.13
Codename:   stretch

I tried to remove the symbolic links (after backing them up) but the error persists.

2 Answers 2


The Foundation advice is that update is not supported.

Unofficial script, posted by users with the expertise to fix issues may work. The chances these will work after almost 2 years when Buster is nearing its end are close to zero.

Do a fresh install.

  • The issue is that I need to upgrade someone else's RPi which is thousand KM away from me. He has disability can the only computer he has is the RPi that I gave him last year. It would be great if I can find a workaround otherwise it would be hard to help him. Commented Feb 1, 2021 at 6:25
  • @MostafaAhangarha regardless of the reason it is still not recommended. Even an experienced user would not attempt to do this by remote control. Send him a fresh SD Card which works.
    – Milliways
    Commented Feb 1, 2021 at 7:23
  • For now I have removed wolfram-engine to avoid the error. I will try upgrade on my own RPi and if succeeded, then repeat it on his machine. If now, I will install fresh copy on mine and then config it and make image for him. Then will find a person to write that image on his SD. I hope the first approach works. Thanks for your inputs. Commented Feb 1, 2021 at 7:31

This is not the solution but I need to share this to conclude this question.

Since I didn't need this software, I simple uninstalled it. So the without getting the error, I could proceed with upgrading task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.