21 March 2013

366. nspluginwrapper on debian testing/wheezy

I only recently realised that nspluginwrapper wasn't in the debian wheezy/testing repos -- and it is absolutely necessary if you want to get BankID to work (here and here).

The easiest way to install nspluginwrapper in debian is to enable the stable repos. E.g. on my wheezy laptop I have the following /etc/apt/sources.list:
deb http://ftp.au.debian.org/debian/ wheezy main contrib non-free
deb http://ftp.au.debian.org/debian/ squeeze main contrib non-free
While normally you shouldn't mix different repos without some pretty strict apt-pinning policies, this works since apt automatically pulls in the newest version of each package -- and that'd be the package in wheezy which is the distro I'm using.

If that still makes you nervous, the second easiest option is simply to compile nspluginwrapper yourself. It's complicated a little bit by bug 682678.

sudo apt-get install libc6-dev-i386 g++-multilib checkinstall libglib2.0-dev build-essential libgtk2.0-dev libcurl4-gnutls-dev libxt-dev
mkdir ~/tmp
cd ~/tmp
wget http://nspluginwrapper.org/download/nspluginwrapper-1.4.4.tar.gz
tar xvf nspluginwrapper-1.4.4.tar.gz
cd nspluginwrapper-1.4.4/
sudo checkinstall

Error 1:
make fails with complaints about
/usr/include/features.h -> bits/predefs.h

It's fixed by installig libc6-dev-i386

Error 2:
make fails with a message about
skipping incompatible libsupc++.a

It's fixed by installing g++-multilib


  1. I needed this from a nearly fresh install, but a few other dependencies are needed:

    after you ./configure, you might get an error about "GLIB 2.0 environment not found"

    which is fixed by installing libglib2.0-dev

    "GTK+ 2.0 environment not found" needs build-essential and libgtk2.0-dev

    "cURL environment not found" needs libcurl4-gnutls-dev

    "X11/xt environment not found" needs libxt-dev

    1. Thank you -- I've updated the build depends now. When I have time I set up a chroot to sort out the dependencies, but I don't always have time to do that and get lazy.

  2. I also needed manually to move the nspluginwrapper-1.4.4/ directory from /opt, where I compiled it, to /usr/lib/mozilla/plugins. Before doing so, dpkg wouldn't let me install icaclient because nspluginwrapper "isn't installed." (I may be a complete moron, but usually running "make install" suffices to apprise dpkg that a program exists....maybe not in the case of plugins, i guess...)

    1. That seems very odd. And it seems wrong to put the binaries in /usr/lib/mozilla/plugins.

      And I think dpkg will only be aware of new pieces of software in case package-kit is operational and there's a .pc file for the new package. You can create the .pc file by hand.

    2. Oh, and try using checkinstall instead as shown above -- that way dpkg will be aware of it.