How to fix "No suitable archive manager found" on Linux mint 21.1

Endrit Qerreti

Endrit Qerreti

On linux mint, there is an option that lets you create archives on your computer. You have to right click over the folder or file that you want to add to the archive, and it would archive these files into a archive format such as : 7z, zip, rar etc.

So I tried to archive some files today on my computer which uses Linux mint 21.1, and It wasn't working, I kept getting the error " no suitable archive manager found.

I instantly knew that the issue wasn't with Linux mint itself, the issue was caused by and related to xarchiver.

xarchiver is the front end default tool that Linux mint uses to create archives. So my first thought that came to my mind was to run xarchiver from terminal, this would bypass the context menu if something happened to the option "Create archive"  

whereis xarchiver

and it turns out there's no execution path specified for xarchiver, which means xarchiver got removed from my system

then I tried to launch xarchiver by manually typing its source path

/usr/bin/xarchiver

and yes, there was no binary file for xarchiver

Now I know that xarchiver it's not installed, but the thing that I want to know is what happened to xarchiver, because I don't remember removing xarchiver from my system, so I started looking around to see what happened.

I thought to check dpkg.log file, the dpkg.log contains all logs for removed and installed packages, so when you update, add or remove a package from the system, this action gets logged on dpkg.log file.

grep "xarchiver" /var/log/dpkg.log

I used grep to view only logs related to xarchiver, and saw that xarchiver package was in half-configured and half-installed state

Now that doesn't sound right, so I went and purged xarchiver from my system before reinstalling it

sudo apt purge xarchiver

Next, I installed xarchiver

sudo apt install xarchiver

And I went to try to archive some files, right clicked over the folder that I was going to archive, and this time xarchiver opens, so it runs fine, but the "Create button" was greyed out, so it was like a "partial-working" state

I thought maybe the installation wasn't done correctly again, so I reinstalled it again with

sudo apt install xarchiver --reinstall

Tried to archive files, and no the Create button was still greyed out

then I thought to try to run xarchiver from the terminal

xarchiver

And bam, the create button was working now.

So xarchiver works fine when launched from the terminal, but it doesn't work when launched from the context menu, so this tells me that the .desktop file that the option Create archive in the context menu is using may be executing xarchiver with an argument, which maybe is causing this, so I went and checked xarchiver.desktop which is located on

/usr/share/applications/xarchive.desktop

and xarchive is actually being executed with an argument, but this is the %f parameter which is used to pass the parameter from a file

So, xarchive.desktop it's not causing the issue either. I went and launched xarchive from the terminal again, the only thing that I did not check is settings on xarchiver, and I saw that the "preferred archive format" was empty, I set the preferred archive format to .zip

Then I tried to create an archive again by using the context menu, and...bam the Create archive button was enabled and it worked perfectly.  To set your own preferences on xarchiver

Launch xarchiver > Action > Preferences and click to Archive section as shown in the image above, and then set your own preferred archive format.

💡
Note: If the create archive button doesn't do anything after changing the preferred archive format, make sure you have the libraries to handle the format you chose. For example, if you chose rar as preferred archive format, then you should have rar installed on your system.

For example, here is how to install rar, unzip and zip that xarchiver will be using to create archives.

rar

rar is the tool that you can use to compress and uncompress rar files

sudo apt install rar

unzip

To be able to unzip files with unzip, you need to have unzip installed, run the command below to install unzip

sudo apt install unzip

zip

Install zip package by running the command below, this is the tool that you can use to compress zip files

sudo apt install zip

Conclusion

In this tutorial, you learned how to fix the issue "no suitable archive manager found" that happens when xarchiver is not installed on your system. We also explained how to fix the issue with not being able to create archives using xarchiver, even when xarchiver and its libraries were installed on the system.