installing eid-viewer eid-middleware on debian 9 stretch

As you know Debian 9 is still in its testing phase and http://eid.belgium.be/en/using_your_eid/installing_the_eid_software/linux doesn’t have a package yet for debian that you could install. So I built it from the tar file. Because I had some hurdles to overcome, I’m sharing this article for other curious creatures who want to just go on with their lives while working on a testing distro..

To build something you need to install the build essentials ofcourse:

sudo apt-get install build-essential

now go download the tar file here http://eid.belgium.be/en/using_your_eid/installing_the_eid_software/linux
and unpack it:

tar -xf eid-mw-4.2.5-v4.2.5.tar.gz 
cd eid-mw-4.2.5-v4.2.5/

Now I’ll save you some time by listing the libraries I had to install after getting errors all the time when trying to do ./configure and hunting down the package name:

sudo apt-get install -y pkg-config libpcsclite-dev libgtk-3-dev libxml2-dev libproxy-dev libssl-dev libcurl4-openssl-dev

When you managed to run ./configure and you succesfully created the makefile do:

make

and

sudo make install

now try run the eid-viewer from the cli:

eid-viewer

I had to copy over the following libraries it installed in /usr/local/lib.

sudo cp /usr/local/lib/libeidviewer.* /usr/lib/
sudo cp /usr/local/lib/libbeidpkcs11.* /usr/lib/
eid-viewer

# SUCCESS!

# EXTRA info on adding libraries to the /usr/local/lib path:

Set this at shell for temporary use or add to the shell initialization file for permanent effect:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

OR

Adjust ldconfig and rebuild cache
Open the /etc/ld.so.conf as sudo and add a new line with the library directory. In this case, we add /usr/local/lib.

Rerun ldconfig to rebuild the cache:

sudo ldconfig

Check if the shared library cache now includes the shared libraries from the new directory:

ldconfig -p

## Command Extras on finding needed libraries with ldd – objdump – readelf

patrick@stretch:~$ objdump -x "/usr/local/bin/eid-viewer" | grep NEEDED
  NEEDED               libgtk-3.so.0
  NEEDED               libgdk-3.so.0
  NEEDED               libpangocairo-1.0.so.0
  NEEDED               libpango-1.0.so.0
  NEEDED               libatk-1.0.so.0
  NEEDED               libcairo-gobject.so.2
  NEEDED               libcairo.so.2
  NEEDED               libgdk_pixbuf-2.0.so.0
  NEEDED               libgio-2.0.so.0
  NEEDED               libgobject-2.0.so.0
  NEEDED               libglib-2.0.so.0
  NEEDED               libssl.so.1.1
  NEEDED               libcrypto.so.1.1
  NEEDED               libxml2.so.2
  NEEDED               libcurl.so.4
  NEEDED               libproxy.so.1
  NEEDED               libpcsclite.so.1
  NEEDED               libeidviewer.so.0
  NEEDED               libpthread.so.0
  NEEDED               libc.so.6
[1]+  Klaar                   eid-viewer
patrick@stretch:~$ readelf -d /usr/local/bin/eid-viewer | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libgtk-3.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgdk-3.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpangocairo-1.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpango-1.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libatk-1.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libcairo-gobject.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libcairo.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libgdk_pixbuf-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libssl.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libxml2.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libcurl.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libproxy.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpcsclite.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libeidviewer.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
patrick@stretch:~$ ldd /usr/local/bin/eid-viewer 
	linux-vdso.so.1 (0x00007ffe32706000)
	libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f1461d86000)
	libgdk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007f1461a8f000)
	libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f1461882000)
	libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f1461636000)
	libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f1461410000)
	libcairo-gobject.so.2 => /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007f1461205000)
	libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f1460ef1000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f1460cce000)
	libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f1460938000)
	libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f14606e5000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f14603d1000)
	libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f1460163000)
	libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f145fcd0000)
	libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f145f915000)
	libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007f145f695000)
	libproxy.so.1 => /usr/lib/x86_64-linux-gnu/libproxy.so.1 (0x00007f145f474000)
	libpcsclite.so.1 => /usr/lib/x86_64-linux-gnu/libpcsclite.so.1 (0x00007f145f269000)
	libeidviewer.so.0 => /usr/lib/libeidviewer.so.0 (0x00007f145f031000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f145ee14000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f145ea76000)
	libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f145e872000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f145e532000)
	libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f145e322000)
	libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f145e11d000)
	libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f145df1a000)
	libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f145dd14000)
	libatk-bridge-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007f145dae5000)
	libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f145d8a5000)
	libwayland-cursor.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007f145d69d000)
	libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f145d499000)
	libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f145d28a000)
	libepoxy.so.0 => /usr/lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007f145cf94000)
	libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f145cd7e000)
	libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f145cb40000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f145c891000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f145c58b000)
	libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f145c388000)
	libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f145c17d000)
	libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f145bf72000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f145bd60000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f145bb58000)
	libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f145b954000)
	libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007f145b74a000)
	libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f145b4a3000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f145b270000)
	libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f145b06c000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f145ae42000)
	libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f145ac34000)
	libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f145aa2a000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f145a810000)
	libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f145a5e8000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f145a3d1000)
	libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007f145a181000)
	libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f1459f78000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1459d05000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1459b01000)
	libicui18n.so.57 => /usr/lib/x86_64-linux-gnu/libicui18n.so.57 (0x00007f1459687000)
	libicuuc.so.57 => /usr/lib/x86_64-linux-gnu/libicuuc.so.57 (0x00007f14592df000)
	libicudata.so.57 => /usr/lib/x86_64-linux-gnu/libicudata.so.57 (0x00007f1457860000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f145763a000)
	libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f1457414000)
	libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f14571f2000)
	librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f1456fd5000)
	libssh2.so.1 => /usr/lib/x86_64-linux-gnu/libssh2.so.1 (0x00007f1456da9000)
	libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f1456b99000)
	libssl.so.1.0.2 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.2 (0x00007f1456930000)
	libcrypto.so.1.0.2 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2 (0x00007f14564cc000)
	libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f1456281000)
	libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f1455fa7000)
	libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f1455d74000)
	libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f1455b6e000)
	liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f145595f000)
	libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f145570e000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f145538c000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1455175000)
	libbeidpkcs11.so.0 => /usr/lib/libbeidpkcs11.so.0 (0x00007f1454f00000)
	/lib64/ld-linux-x86-64.so.2 (0x0000564f87520000)
	libatspi.so.0 => /usr/lib/x86_64-linux-gnu/libatspi.so.0 (0x00007f1454ccd000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f1454a7d000)
	libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f14547e8000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f14545be000)
	libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f14543b4000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f14541b0000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1453faa000)
	libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f1453d64000)
	libunistring.so.0 => /usr/lib/x86_64-linux-gnu/libunistring.so.0 (0x00007f1453a4d000)
	libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f14536b2000)
	libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f145347d000)
	libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f1453246000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f1452fc3000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f1452cb4000)
	libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f1452aa8000)
	libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f14528a2000)
	libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f1452687000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f14525fd000)
	libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f14523d0000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f14521ba000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f1451fb3000)
	libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f1451d4e000)
	libidn.so.11 => /lib/x86_64-linux-gnu/libidn.so.11 (0x00007f1451b1a000)
	libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f1451907000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f14516f3000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f14514df000)

7 thoughts on “installing eid-viewer eid-middleware on debian 9 stretch

  1. I am also running Debian testing (i.e., currently ‘stretch’), but I have so far been using the Belgian eID software under Ubuntu. When I wanted to install the software on my Debian system, I realised that it wasn’t yet available for stretch, so out of curiosity, I attempted to install it from its ‘jessie’ area (which, pretty unsurprisingly, failed).

    When I took a closer look at the repository, I noticed that there existed a ‘sid’ area under the ‘candidate’ repository, so I decided to try that, and lo and behold… it worked!

    Thus, I am now running the eID software from the ‘candidate/sid’ area of its repository. Granted, this is a pre-release version of the software, but Debian testing is also pre-release, so I guess it’s a perfect fit.

    Now, I wasn’t really sure if what I did was anything like a ‘normal’ or ‘recommended’ solution, or if I was just ‘lucky’ that it worked, so I went looking for more information about the proper way to use the software under Debian testing… which brought me here. I’ll sure keep this post in mind, should I ever run into trouble and need another solution to get it to work.

    In any case, many thanks for the detailed information!

    Like

    1. Hi Luc
      Yes I tried that path. I just didn’t approve of the entry in the sources.list file it generates. It creates a wheezy entry when you install their packages from here So they use a wheezy repository for the install on jessie and upwards. That is amateurish. 1 they should have their package in the repositories (not requiring you to go fetch it from their website), I think they fear the hassle or extra reviewing done when a package goes through the approval process. 2 I wanted to be absolutely sure it would be working for my system on stretch by building it and yes 3 I don’t want any generic wheezy package installed. In short check your sources.list or sources.list.d files. you’ll see that sid redirects to the same wheezy repository. Unless I’m wrong and they changed something.
      Thank you for your comment, should have explained that a bit more up front

      Like

  2. Hmmm… I created my sources.list entry manually, so it just says “candidate/sid”.

    I didn’t like the idea of downloading and installing an out-of-band “eid-archive.deb” package without knowing what exactly it would do, so instead of installing it, I unpacked and studied it after downloading it.

    In the end, I decided that I didn’t need it, because it really just loaded the public keys for the repository and created the “sources.list” entry. (And, yes, you’re right: if it cannot identify the running Debian release, it will fall back to “wheezy”). Thus, I wrote a shell script that receives the public keys from a keyserver, and that sets up the “sources.list” entry for me. If the running Debian release is supported by the repository, then it will specify that release in the “sources.list” file, otherwise it will use “candidate/sid”.

    Like

  3. I have just posted the script, with some documentation at the following location: “http://linuxluvr.blogspot.be/2017/06/installing-belgian-eid-software-under.html”.

    Liked by 1 person

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s