Fix Raspberry Pi File Manager Crashing

If you’ve recently updated your Raspberry Pi installation, and you’ve started to notice that every time you try and open the file manager it instantly closes again, here’s how to fix it.

Raspbian’s PCMan File Manager app is usually a pretty solid piece of code. Despite the continual updates to the core distro, alongside many other updates and upgrades, the file manager has always remained a constant source of stability. However, if you’ve updated and upgraded recently, then you’ll probably have come across an issue whereby opening the file manager will result in it closing almost instantly.

The problem lies with the way we’ve traditionally updated and upgraded packages within a Linux distribution. Historically, most of us have used apt-get update, and apt-get upgrade, which is fine but there have been some subtle changes over the years that now mean we need to look at things a little differently.

The apt-get command worked well enough, but it has since been replaced by Debian with apt. So where you would once enter apt-get update, to search for and install any package upgrades from the repositories, we would now use apt upgrade.

 

Apt-get upgrade would inherently install newer versions of all the system’s installed packages, but without installing any new dependencies. Apt upgrade, on the other hand, will install new version, check for new dependencies, but won’t do anything that will result in a package getting removed from the system.

In turn, the PCMan File Manager and libfm packages were updated, with pcmanfm getting a new set of dependencies, which meant that if you executed an apt-get upgrade you would notice that the pcmanfm package was held back while libfm was upgraded.

Now that pcmanfm and libfm are out of sync, and as such no longer compatible. Opening the file manager under such circumstances results in the app closing itself again.

To fix the issue, therefore, you will need in future to update and upgrade your Raspberry Pi by issuing the following commands:

sudo apt update
sudo apt full-upgrade

The full-upgrade option of apt will install any newer versions of the packages, check for new dependencies, and upgrade the lot even if it means a package will be removed in the process.

Running the above commands will update and upgrade all your packages, and ultimately fix the issue you’re having with the file manager shutting down as soon as you open it. It’s best from this point on to remove apt-get update/upgrade from your scripts etc, and opt for the better apt update/full-upgrade options.

Previous Post
Is Apple Still Working on a Foldable iPhone?
Next Post
ExpressVPN Review – The Best VPN Ever?