prioritize your repositories with apt-pinning

files that are used on this topic are

patrick@stretch:~$ ls /etc/apt/apt.conf.d/70debconf /etc/apt/sources.list /etc/apt/sources.list.d /etc/apt/preferences.d/
/etc/apt/apt.conf.d/70debconf  /etc/apt/sources.list

/etc/apt/preferences.d/:
external.pref  stretch_main.pref  stretch_security_updates.pref  unstable.pref

/etc/apt/sources.list.d:
external.list  stretch_main.list  stretch_security_updates.list  unstable.list

To understand the format better visit this site: Debian Repository Format

You can just have the repositories in the sources.list file but it is recommended to create them seperately in the sources.list.d directory.
Then create equally named .pref files in the preference.d directory.

It’s a good thing to understand the meaning of the priority numbers apt uses by default so you don’t get confused along the way when you see them popup:

in short
If the target release has been specified then APT uses the following algorithm to set the priorities of the versions of a package. Assign:

priority 100
to the version that is already installed (if any).
priority 500
to the versions that are not installed and do not belong to the target release.
priority 990
to the versions that are not installed and belong to the target release.

If the target release has not been specified then APT simply assigns priority 100 to all installed package versions and priority 500 to all uninstalled package versions.

Now you know what the default priority numbers are you can set your own in your example.pref file according to the apt algorithm:

How Apt Interprets Priorities

Priorities (P) assigned in the APT preferences file must be positive or negative integers. They are interpreted as follows (roughly speaking):

P > 1000
causes a version to be installed even if this constitutes a downgrade of the package.
990 < P <=1000
causes a version to be installed even if it does not come from the target release, unless the installed version is more recent.
500 < P <=990
causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent.
100 < P <=500
causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent.
0 < P <=100
causes a version to be installed only if there is no installed version of the package.
P < 0
prevents the version from being installed.

I am currently using stretch RC2 which is at the time of this writing still a testing distribution. It is highly recommended not to use unstable packages as they well aren’t tested. If you download a package from a testing repository then you’re downloading a package that has been bugfree for 10 consecutive days. However if it is a desktop and you are okay with destroying it to the point of no recovery then you can use it like I do.

I highly recommend you read through the manual on your distribution

man 5 apt_preferences

This is what I’ve got
in my sources file, note that everything is commented out here or I would have a conflict with my files in the sources.list.d directory

patrick@stretch:~$ cat /etc/apt/sources.list
# 

# deb cdrom:[Debian GNU/Linux stretch-DI-rc2 _Stretch_ - Official Snapshot amd64 DVD Binary-1 20170201-11:49]/ stretch contrib main

#deb cdrom:[Debian GNU/Linux stretch-DI-rc2 _Stretch_ - Official Snapshot amd64 DVD Binary-1 20170201-11:49]/ stretch contrib main

#deb http://ftp.belnet.be/debian/ stretch main
#deb-src http://ftp.belnet.be/debian/ stretch main

#deb http://security.debian.org/debian-security stretch/updates main contrib
#deb-src http://security.debian.org/debian-security stretch/updates main contrib

#deb http://ftp.belnet.be/debian/ sid main
#deb http://ftp.belnet.be/debian/ sid contrib non-free
patrick@stretch:~$ ls /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/external.list
/etc/apt/sources.list.d/stretch_main.list
/etc/apt/sources.list.d/stretch_security_updates.list
/etc/apt/sources.list.d/unstable.list

patrick@stretch:~$ cat /etc/apt/sources.list.d/*
# Debian 3rd party repositories
deb http://apt.insynchq.com/debian stretch non-free contrib
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
# -----------------------------
# Stretch main package repos
deb http://ftp.belnet.be/debian/ stretch main
deb-src http://ftp.belnet.be/debian/ stretch main
# ----------------------------
# Stretch security packages repositories
deb http://security.debian.org/debian-security stretch/updates main contrib
deb-src http://security.debian.org/debian-security stretch/updates main contrib
# -----------------------------------
# Debian Unstable repos (sid)
deb http://ftp.belnet.be/debian/ sid main
deb http://ftp.belnet.be/debian/ sid contrib non-free
# ---------------------------
patrick@stretch:~$

Note that my stretch repository is atm a testing repository as stretch is being tested. As soon as Stretch is officially released it will become a stable repository.. That is why I don’t have a testing repository in this setup ­čÖé

patrick@stretch:~$ ls /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/external.list
/etc/apt/sources.list.d/stretch_main.list
/etc/apt/sources.list.d/stretch_security_updates.list
/etc/apt/sources.list.d/unstable.list

patrick@stretch:~$ cat /etc/apt/preferences.d/*Package: *
Pin: release a=external
Pin-Priority: 500
Package: *
Pin: release a=stretch_main
Pin-Priority: 900
Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000
Package: *
Pin: release a=unstable
Pin-Priority: 50

When you’re done adjusting those list or pref files don’t forget to do sudo apt-get update to have your config recognized.

In this example you can see I set the unstable repository to a priority of 50

patrick@stretch:/etc/apt/sources.list.d$ sudo apt-cache policy adduser
[sudo] wachtwoord voor patrick:
adduser:
  Geïnstalleerd: 3.115
  Kandidaat:     3.115
  Versietabel:
 *** 3.115 990
        990 http://ftp.belnet.be/debian stretch/main amd64 Packages
         50 http://ftp.belnet.be/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status
patrick@stretch:~$ sudo apt-cache policy
Pakketbestanden:
 100 /var/lib/dpkg/status
     release a=now
  50 http://ftp.belnet.be/debian sid/non-free amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=amd64
     origin ftp.belnet.be
  50 http://ftp.belnet.be/debian sid/contrib amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=amd64
     origin ftp.belnet.be
  50 http://ftp.belnet.be/debian sid/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
     origin ftp.belnet.be
 990 http://ftp.belnet.be/debian stretch/main amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=main,b=amd64
     origin ftp.belnet.be
 500 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
     release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main,b=amd64
     origin dl.google.com
 990 http://apt.insynchq.com/debian stretch/contrib amd64 Packages
     release o=Insynchq, Inc.,n=stretch,l=Insynchq, Inc.,c=contrib,b=amd64
     origin apt.insynchq.com
 990 http://apt.insynchq.com/debian stretch/non-free amd64 Packages
     release o=Insynchq, Inc.,n=stretch,l=Insynchq, Inc.,c=non-free,b=amd64
     origin apt.insynchq.com
Vastgepinde pakketten:

Note that the debian stretch repositories are set to 990 even though I set otherwise in my own pref files.. Now why is that?

Well it is because that is what is set as my default target release in the file
/etc/apt/apt.conf.d/70debconf

patrick@stretch:~$ cat /etc/apt/apt.conf.d/
00CDMountPoint         20auto-upgrades        50unattended-upgrades
00trustcdrom           20listchanges          60gnome-software
01autoremove           20packagekit           70debconf
01autoremove-kernels   50appstream
patrick@stretch:~$ cat /etc/apt/apt.conf.d/70debconf
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
APT::Default-Release "stretch";
APT::Cache-Limit 100000000;
Apt::Get::Purge;
//had problems with running MMap runs out of room, so add cache-limit//
//APT::Cache-Limit "25165824";
//Server down takes too long, add timout
Acquire::http::Timeout "3";
Acquire::ftp::Timeout "3";

If I didn’t have the distro code “stretch” configured in my sources I could have configured it this way if I wanted to continuesly use the testing repositories even when stretch was officially released as a stable distro:

deb http://security.debian.org testing/updates main contrib non-free
deb-src http://security.debian.org testing/updates main contrib non-free

Do sudo apt-get update && sudo apt-get dist-upgrade to update your system on a regular basis.

if in doubt once more read the fine manual
TLDR,RTFM:

man 5 apt_preferences

When you run “apt-get -t unstable install foo”, this sets APT::Default-Release for this invocation of apt-get, but it doesn’t affect future runs. This is useful in some circumstances, but problematic in others
You can also leave the -t flag and do it this way using a forward slash

apt-get install pkgname1/stable pkgname2/stable

PS: All your sources in /etc/apt/sources.list.d are compiled to a single list in the /var/lib/apt/ directory
If you ever have a problem with that file you can rename the lists file to lists.old or something and the regenerate the file with apt-get update

patrick@debian:/var/lib/apt$ ls -ahl
total 144K
drwxr-xr-x  6 root root 4.0K May 16 12:06 .
drwxr-xr-x 61 root root 4.0K May 15 18:10 ..
-rw-r--r--  1 root root  269 Apr 20  2016 cdroms.list
-rw-r--r--  1 root root  269 Apr 20  2016 cdroms.list~
-rw-r--r--  1 root root    0 May 16 10:25 daily_lock
-rw-r--r--  1 root root  76K May 16 00:47 extended_states
drwxr-xr-x  3 root root  20K May 16 12:06 lists
drwxr-xr-x  3 root root  20K May 15 17:33 lists.old
drwxr-xr-x  3 root root 4.0K Apr 20  2016 mirrors
drwxr-xr-x  2 root root 4.0K Sep 15  2015 periodic

Sources

Debian SourcesList
Debian Testing

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)

autoinstall unmet dependencies / installing chrome on debian

When installing a package with dpkg you can have unmet dependencies preventing you to install the package. You could be tempted to go copy pasting to install every unmet dependency.

you can download the latest google chrome package here, if you’d like to follow along.┬áhttps://www.google.com/intl/en/chrome/browser/


patrick@stretch:~/Downloads$ sudo dpkg -i google-chrome-stable_current_amd64.deb
(Database wordt ingelezen ... 145712 bestanden en mappen momenteel geïnstalleerd.)
Uitpakken van google-chrome-stable_current_amd64.deb wordt voorbereid...
Bezig met uitpakken van google-chrome-stable (56.0.2924.87-1) over (56.0.2924.87-1) ...
dpkg: vereistenproblemen verhinderen de configuratie van google-chrome-stable:
google-chrome-stable is afhankelijk van libappindicator1; maar:
Pakket libappindicator1 is niet geïnstalleerd.

dpkg: fout bij verwerken van pakket google-chrome-stable (--install):
vereistenproblemen - blijft ongeconfigureerd
Bezig met afhandelen van triggers voor man-db (2.7.6.1-2) ...
Bezig met afhandelen van triggers voor desktop-file-utils (0.23-1) ...
Bezig met afhandelen van triggers voor gnome-menus (3.13.3-8) ...
Bezig met afhandelen van triggers voor mime-support (3.60) ...
Fouten gevonden tijdens verwerken van:
google-chrome-stable

There is actually a really simple way to install those unmet depends.
Just type sudo apt-get update;sudo apt-get -f install and you’re good to go.

patrick@stretch:~/Downloads$ sudo apt-get -f install
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
Vereisten worden gecorrigeerd... Klaar
De volgende extra pakketten zullen geïnstalleerd worden:
libappindicator1 libdbusmenu-glib4 libdbusmenu-gtk4 libindicator7
De volgende NIEUWE pakketten zullen geïnstalleerd worden:
libappindicator1 libdbusmenu-glib4 libdbusmenu-gtk4 libindicator7
0 opgewaardeerd, 4 nieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.
1 niet volledig geïnstalleerd of verwijderd.
Er moeten 300 kB aan archieven opgehaald worden.
Na deze bewerking zal er 569 kB extra schijfruimte gebruikt worden.
Wilt u doorgaan? [J/n] J
Ophalen:1 http://ftp.belnet.be/debian stretch/main amd64 libdbusmenu-glib4 amd64 12.10.2-2 [104 kB]
Ophalen:2 http://ftp.belnet.be/debian stretch/main amd64 libdbusmenu-gtk4 amd64 12.10.2-2 [90,8 kB]
Ophalen:3 http://ftp.belnet.be/debian stretch/main amd64 libindicator7 amd64 0.5.0-3 [52,6 kB]
Ophalen:4 http://ftp.belnet.be/debian stretch/main amd64 libappindicator1 amd64 0.4.92-4 [52,5 kB]
300 kB opgehaald in 1s (188 kB/s)
Voorheen niet geselecteerd pakket libdbusmenu-glib4:amd64 wordt geselecteerd.
(Database wordt ingelezen ... 145712 bestanden en mappen momenteel geïnstalleerd.)
Uitpakken van .../libdbusmenu-glib4_12.10.2-2_amd64.deb wordt voorbereid...
Bezig met uitpakken van libdbusmenu-glib4:amd64 (12.10.2-2) ...
Voorheen niet geselecteerd pakket libdbusmenu-gtk4:amd64 wordt geselecteerd.
Uitpakken van .../libdbusmenu-gtk4_12.10.2-2_amd64.deb wordt voorbereid...
Bezig met uitpakken van libdbusmenu-gtk4:amd64 (12.10.2-2) ...
Voorheen niet geselecteerd pakket libindicator7:amd64 wordt geselecteerd.
Uitpakken van .../libindicator7_0.5.0-3_amd64.deb wordt voorbereid...
Bezig met uitpakken van libindicator7:amd64 (0.5.0-3) ...
Voorheen niet geselecteerd pakket libappindicator1:amd64 wordt geselecteerd.
Uitpakken van .../libappindicator1_0.4.92-4_amd64.deb wordt voorbereid...
Bezig met uitpakken van libappindicator1:amd64 (0.4.92-4) ...
Instellen van libindicator7:amd64 (0.5.0-3) ...
Instellen van libdbusmenu-glib4:amd64 (12.10.2-2) ...
Bezig met afhandelen van triggers voor libc-bin (2.24-9) ...
Instellen van libdbusmenu-gtk4:amd64 (12.10.2-2) ...
Instellen van libappindicator1:amd64 (0.4.92-4) ...
Instellen van google-chrome-stable (56.0.2924.87-1) ...
update-alternatives: /usr/bin/google-chrome-stable wordt gebruikt om in de automatische modus in /usr/bin/x-www-browser (x-www-browser) te voorzien.
update-alternatives: /usr/bin/google-chrome-stable wordt gebruikt om in de automatische modus in /usr/bin/gnome-www-browser (gnome-www-browser) te voorzien.
update-alternatives: /usr/bin/google-chrome-stable wordt gebruikt om in de automatische modus in /usr/bin/google-chrome (google-chrome) te voorzien.
Bezig met afhandelen van triggers voor libc-bin (2.24-9) ...

get your intel wifi drivers recognized on debian 9

Upon installation of Debian Stretch RC2 my Intel┬« Wireless 8260 NIC isn’t recognized so I got a message telling me to install multiple missing .ucode files.
The normal procedure is to then download those missing files and place them in the root of an external usb stick. That didn’t seem to work for me as described here:
https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi
So I continued installation over an ethernet link.
I then tried installing the ucode file iwlwifi-8000-ucode-25.30.13.0 for my nic by copying it over to the
/lib/firmware/ directory and modprobing but I was still getting error messages:


patrick@stretch:~$ sudo modprobe iwlwifi
[sudo] wachtwoord voor patrick:
patrick@stretch:~$ sudo dmesg | grep iwl
[    2.476595] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002)
[    2.522888] iwlwifi 0000:04:00.0: firmware: failed to load iwlwifi-8000C-26.ucode (-2)
[    2.522890] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-26.ucode failed with error -2
[    2.522901] iwlwifi 0000:04:00.0: firmware: failed to load iwlwifi-8000C-25.ucode (-2)
[    2.522902] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-25.ucode failed with error -2
[    2.522909] iwlwifi 0000:04:00.0: firmware: failed to load iwlwifi-8000C-24.ucode (-2)
[    2.522910] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-24.ucode failed with error -2
[    2.522918] iwlwifi 0000:04:00.0: firmware: failed to load iwlwifi-8000C-23.ucode (-2)
[    2.522918] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-23.ucode failed with error -2

So I got wind of a package in the debian sid (Debian unstable ) repository that has an intel firmware package I might need.

patrick@stretch:~$ sudo apt-cache search firmware-iwlwifi
firmware-iwlwifi - Binary firmware for Intel Wireless cards

Once I applied this package from the sid repository my NIC got recognized and I was back in wireless heaven ­čśë
Indeed the errors were gone now:

patrick@stretch:~$ sudo modprobe iwlwifi
patrick@stretch:~$ sudo dmesg | grep iwl
[    2.536385] iwlwifi 0000:04:00.0: loaded firmware version 22.361476.0 op_mode iwlmvm
[    2.611472] iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208
[    2.614252] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    2.615445] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    2.752933] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[    2.755201] iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0
[    3.309585] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    3.310106] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    3.440093] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    3.440508] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    3.601917] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    3.602875] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    3.732946] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    3.733361] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled

I hope this post it helpful to you!

here is some more info on the package and its content

patrick@stretch:~$ sudo apt-cache policy firmware-iwlwifi
[sudo] wachtwoord voor patrick:
firmware-iwlwifi:
  Geïnstalleerd: 20161130-2
  Kandidaat:     20161130-2
  Versietabel:
 *** 20161130-2 100
         50 http://ftp.belnet.be/debian sid/non-free amd64 Packages
        100 /var/lib/dpkg/status

patrick@stretch:/usr/lib/mozilla/plugins$ dpkg -L firmware-iwlwifi
/.
/lib
/lib/firmware
/lib/firmware/intel
/lib/firmware/intel/ibt-11-5.ddc
/lib/firmware/intel/ibt-11-5.sfi
/lib/firmware/intel/ibt-12-16.ddc
/lib/firmware/intel/ibt-12-16.sfi
/lib/firmware/intel/ibt-hw-37.7.10-fw-1.0.1.2d.d.bseq
/lib/firmware/intel/ibt-hw-37.7.10-fw-1.0.2.3.d.bseq
/lib/firmware/intel/ibt-hw-37.7.10-fw-1.80.1.2d.d.bseq
/lib/firmware/intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
/lib/firmware/intel/ibt-hw-37.7.bseq
/lib/firmware/intel/ibt-hw-37.8.10-fw-1.10.2.27.d.bseq
/lib/firmware/intel/ibt-hw-37.8.10-fw-1.10.3.11.e.bseq
/lib/firmware/intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq
/lib/firmware/intel/ibt-hw-37.8.bseq
/lib/firmware/iwlwifi-100-5.ucode
/lib/firmware/iwlwifi-1000-5.ucode
/lib/firmware/iwlwifi-105-6.ucode
/lib/firmware/iwlwifi-135-6.ucode
/lib/firmware/iwlwifi-2000-6.ucode
/lib/firmware/iwlwifi-2030-6.ucode
/lib/firmware/iwlwifi-3160-12.ucode
/lib/firmware/iwlwifi-3160-14.ucode
/lib/firmware/iwlwifi-3160-16.ucode
/lib/firmware/iwlwifi-3160-17.ucode
/lib/firmware/iwlwifi-3160-9.ucode
/lib/firmware/iwlwifi-3168-21.ucode
/lib/firmware/iwlwifi-3168-22.ucode
/lib/firmware/iwlwifi-3945-2.ucode
/lib/firmware/iwlwifi-4965-2.ucode
/lib/firmware/iwlwifi-5000-2.ucode
/lib/firmware/iwlwifi-5000-5.ucode
/lib/firmware/iwlwifi-5150-2.ucode
/lib/firmware/iwlwifi-6000-4.ucode
/lib/firmware/iwlwifi-6000g2a-5.ucode
/lib/firmware/iwlwifi-6000g2a-6.ucode
/lib/firmware/iwlwifi-6000g2b-6.ucode
/lib/firmware/iwlwifi-6050-4.ucode
/lib/firmware/iwlwifi-6050-5.ucode
/lib/firmware/iwlwifi-7260-12.ucode
/lib/firmware/iwlwifi-7260-14.ucode
/lib/firmware/iwlwifi-7260-16.ucode
/lib/firmware/iwlwifi-7260-17.ucode
/lib/firmware/iwlwifi-7260-9.ucode
/lib/firmware/iwlwifi-7265-12.ucode
/lib/firmware/iwlwifi-7265-14.ucode
/lib/firmware/iwlwifi-7265-16.ucode
/lib/firmware/iwlwifi-7265-17.ucode
/lib/firmware/iwlwifi-7265-9.ucode
/lib/firmware/iwlwifi-7265D-12.ucode
/lib/firmware/iwlwifi-7265D-14.ucode
/lib/firmware/iwlwifi-7265D-16.ucode
/lib/firmware/iwlwifi-7265D-17.ucode
/lib/firmware/iwlwifi-7265D-21.ucode
/lib/firmware/iwlwifi-7265D-22.ucode
/lib/firmware/iwlwifi-8000C-14.ucode
/lib/firmware/iwlwifi-8000C-16.ucode
/lib/firmware/iwlwifi-8000C-21.ucode
/lib/firmware/iwlwifi-8000C-22.ucode
/lib/firmware/iwlwifi-8265-21.ucode
/lib/firmware/iwlwifi-8265-22.ucode
/usr
/usr/share
/usr/share/appdata
/usr/share/appdata/firmware-iwlwifi.metainfo.xml
/usr/share/bug
/usr/share/bug/firmware-iwlwifi
/usr/share/bug/firmware-iwlwifi/presubj
/usr/share/doc
/usr/share/doc/firmware-iwlwifi
/usr/share/doc/firmware-iwlwifi/changelog.Debian.gz
/usr/share/doc/firmware-iwlwifi/copyright