Tutti Frutti: 7zip + KDE + Arch Linux

I like 7zip, it is a free (LGPL), fast, simple but powerful, multi-platform file archiver (aka compressor). In every computer I use I always install it. Here is the thing, in Arch Linux under KDE it does not work out of the box (a penny for each time I say this sentence). It actually has two problems: it does not start (this is the main issue) and the Dolphin’s context (right-click) menu has duplicate entries. The later is simply annoying, the former is frustrating.

For the impatient archers:
# pacman -S wxgtk2.8
# rm /usr/share/kde4/services/ServiceMenus/p7zip_compress2.desktop

2014-04-22 Update: Originally this post mentioned the wxgtk package however currently the required package is wxgtk2.8. On 2014 Arch Linux, following upstream development, updated it from version 2.8 to version 3.0 but some applications, among them 7zip, still require the older 2.8 version to work and therefore the package wxgtk2.8 was introduced.
Thank you Tobias.


For those who like to waste their time reading stupid troubleshooting stories because they don’t have other better things to do while their consoles update to the latest firmware, keep on.

The reason 7zip was not starting was a missing library, how do you find out? If you launch 7zip from the terminal you will get the following exotic error:
$ 7zFM
/usr/lib/p7zip/7zFM: error while loading shared libraries: libwx_gtk2u_adv-2.8.so.0: cannot open shared object file: No such file or directory

This is one of the easiest troubleshooting cases, the error is telling us which library we miss. Next step is to find out where such a file resides; for such a task we will use pkgfile (in Ubuntu/Debian the equivalent is called apt-file). pkgfile creates a database with all the packages’ files therefore you can search afterwards which package provides file X (tururururuuuuuuu).

If you don’t have it installed yet, you know what to do:
# pacman -S pkgfile
Update the database, that is, let pkgfile to create a database with all the packages’ information. The man page advises us to have the following in a cron job:
# pkgfile -u

Now look for the file (search is the default action):
$ pkgfile libwx_gtk2u_adv-2.8.so.0
extra/wxgtk2.8
multilib/lib32-wxgtk2.8

There are two packages that provide such a file, the native 64 bit version and the package for the 32 bit compatibility layer. I just installed the 64 bit version because I only install software on a need basis:
# pacman -S wxgtk2.8

I searched in the bug tracker and I found it has been reported several times as a bug (26225, 31584) however the 7zip maintainer has a different stand, he explains that 'wxgtk2.8' is listed as an optional dependency for the GUI and therefore you should install it if you’d like to have the graphical interface. I disagree, if 7zip cannot be started in KDE out of the box, then it should not install the KDE launch menu entry neither the Dolphin’s context menus, of course I also admit that I should have paid more attention to the 7zip’s optional dependency field when I installed it in the first place.

For the duplicate Dolphin entries the troubleshooter was Mr. Google and the credit for the fix goes to Juan’s answers.

Advertisements
This entry was posted in Arch Linux, Linux and tagged , , , . Bookmark the permalink.

3 Responses to Tutti Frutti: 7zip + KDE + Arch Linux

  1. aleks says:

    A Beer for you, good sir!

  2. Hi…
    I had to use
    $pacman -S wxgtk2.8

    After that it worked like a charm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s