How I installed Graphviz on Ubuntu 16.04

I started by downloading a single deb file from this page that was apparently intended for Ubuntu 13.10.

The file's name was graphviz_2.38.0-1-saucy_amd64.deb

I then started with a typical dpkg -i command and the installed the dependencies using apt-get install -f as advised here. The process was not uneventful and I had to go back and forth a couple of times. In addition, I also issued a couple of more explicit commands. Here are the commands from my history

 5283  sudo dpkg -i /home/mperdikeas/Downloads/graphviz_2.38.0-1-saucy_amd64.deb
 5284  sudo apt-get -f install
 5285*
 5286  sudo apt-get -f install
 5287  sudo dpkg -i /home/mperdikeas/Downloads/graphviz_2.38.0-1-saucy_amd64.deb
 5288  sudo apt-get install freeglut3
 5289  sudo apt-get -f install freeglut3
 5290  sudo apt-get -f install graphviz
 

And below is the full trace:

$ sudo dpkg -i /home/mperdikeas/Downloads/graphviz_2.38.0-1-saucy_amd64.deb
[sudo] password for mperdikeas:
Selecting previously unselected package graphviz.
(Reading database ... 255820 files and directories currently installed.)
Preparing to unpack .../graphviz_2.38.0-1-saucy_amd64.deb ...
Unpacking graphviz (2.38.0-1~saucy) ...
dpkg: dependency problems prevent configuration of graphviz:
 graphviz depends on freeglut3; however:
  Package freeglut3 is not installed.
 graphviz depends on libglade2-0 (>= 1:2.6.1); however:
  Package libglade2-0 is not installed.
 graphviz depends on libgraphviz4 (>= 2.18); however:
  Package libgraphviz4 is not installed.
 graphviz depends on libgts-0.7-5 (>= 0.7.6); however:
  Package libgts-0.7-5 is not installed.

dpkg: error processing package graphviz (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 graphviz
mperdikeas@mp-t420:~/archetypes/jax-rs/006-login-with-vanilla-REST-web-services-pattern-B/database#
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  graphviz libcdt5 libcgraph6 libgvc6 libgvpr2 libpathplan4
Suggested packages:
  graphviz-doc
The following NEW packages will be installed:
  libcdt5 libcgraph6 libgvc6 libgvpr2 libpathplan4
The following packages will be upgraded:
  graphviz
1 upgraded, 5 newly installed, 0 to remove and 185 not upgraded.
1 not fully installed or removed.
Need to get 1,533 kB of archives.
After this operation, 50.6 MB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libcdt5 amd64 2.38.0-12ubuntu2 [23.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libcgraph6 amd64 2.38.0-12ubuntu2 [43.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libpathplan4 amd64 2.38.0-12ubuntu2 [26.5 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libgvc6 amd64 2.38.0-12ubuntu2 [592 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libgvpr2 amd64 2.38.0-12ubuntu2 [170 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 graphviz amd64 2.38.0-12ubuntu2 [677 kB]
Fetched 1,533 kB in 1s (797 kB/s)
Selecting previously unselected package libcdt5.
(Reading database ... 255987 files and directories currently installed.)
Preparing to unpack .../libcdt5_2.38.0-12ubuntu2_amd64.deb ...
Unpacking libcdt5 (2.38.0-12ubuntu2) ...
Selecting previously unselected package libcgraph6.
Preparing to unpack .../libcgraph6_2.38.0-12ubuntu2_amd64.deb ...
Unpacking libcgraph6 (2.38.0-12ubuntu2) ...
Selecting previously unselected package libpathplan4.
Preparing to unpack .../libpathplan4_2.38.0-12ubuntu2_amd64.deb ...
Unpacking libpathplan4 (2.38.0-12ubuntu2) ...
Selecting previously unselected package libgvc6.
Preparing to unpack .../libgvc6_2.38.0-12ubuntu2_amd64.deb ...
Unpacking libgvc6 (2.38.0-12ubuntu2) ...
Selecting previously unselected package libgvpr2.
Preparing to unpack .../libgvpr2_2.38.0-12ubuntu2_amd64.deb ...
Unpacking libgvpr2 (2.38.0-12ubuntu2) ...
Preparing to unpack .../graphviz_2.38.0-12ubuntu2_amd64.deb ...
Unpacking graphviz (2.38.0-12ubuntu2) over (2.38.0-1~saucy) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libcdt5 (2.38.0-12ubuntu2) ...
Setting up libcgraph6 (2.38.0-12ubuntu2) ...
Setting up libpathplan4 (2.38.0-12ubuntu2) ...
Setting up libgvc6 (2.38.0-12ubuntu2) ...
Setting up libgvpr2 (2.38.0-12ubuntu2) ...
Setting up graphviz (2.38.0-12ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
mperdikeas@mp-t420:~/archetypes/jax-rs/006-login-with-vanilla-REST-web-services-pattern-B/database#
$ sudo dpkg -i /home/mperdikeas/Downloads/graphviz_2.38.0-1-saucy_amd64.deb
dpkg: warning: downgrading graphviz from 2.38.0-12ubuntu2 to 2.38.0-1~saucy
(Reading database ... 255961 files and directories currently installed.)
Preparing to unpack .../graphviz_2.38.0-1-saucy_amd64.deb ...
Unpacking graphviz (2.38.0-1~saucy) over (2.38.0-12ubuntu2) ...
dpkg: dependency problems prevent configuration of graphviz:
 graphviz depends on freeglut3; however:
  Package freeglut3 is not installed.
 graphviz depends on libglade2-0 (>= 1:2.6.1); however:
  Package libglade2-0 is not installed.
 graphviz depends on libgraphviz4 (>= 2.18); however:
  Package libgraphviz4 is not installed.
 graphviz depends on libgts-0.7-5 (>= 0.7.6); however:
  Package libgts-0.7-5 is not installed.

dpkg: error processing package graphviz (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 graphviz
mperdikeas@mp-t420:~/archetypes/jax-rs/006-login-with-vanilla-REST-web-services-pattern-B/database#
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  graphviz
Suggested packages:
  graphviz-doc
The following packages will be upgraded:
  graphviz
1 upgraded, 0 newly installed, 0 to remove and 185 not upgraded.
1 not fully installed or removed.
Need to get 0 B/677 kB of archives.
After this operation, 53.3 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 256028 files and directories currently installed.)
Preparing to unpack .../graphviz_2.38.0-12ubuntu2_amd64.deb ...
Unpacking graphviz (2.38.0-12ubuntu2) over (2.38.0-1~saucy) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up graphviz (2.38.0-12ubuntu2) ...
mperdikeas@mp-t420:~/archetypes/jax-rs/006-login-with-vanilla-REST-web-services-pattern-B/database#
$ sudo dpkg -i /home/mperdikeas/Downloads/graphviz_2.38.0-1-saucy_amd64.deb
dpkg: warning: downgrading graphviz from 2.38.0-12ubuntu2 to 2.38.0-1~saucy
(Reading database ... 255961 files and directories currently installed.)
Preparing to unpack .../graphviz_2.38.0-1-saucy_amd64.deb ...
Unpacking graphviz (2.38.0-1~saucy) over (2.38.0-12ubuntu2) ...
dpkg: dependency problems prevent configuration of graphviz:
 graphviz depends on freeglut3; however:
  Package freeglut3 is not installed.
 graphviz depends on libglade2-0 (>= 1:2.6.1); however:
  Package libglade2-0 is not installed.
 graphviz depends on libgraphviz4 (>= 2.18); however:
  Package libgraphviz4 is not installed.
 graphviz depends on libgts-0.7-5 (>= 0.7.6); however:
  Package libgts-0.7-5 is not installed.

dpkg: error processing package graphviz (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 graphviz
mperdikeas@mp-t420:~/archetypes/jax-rs/006-login-with-vanilla-REST-web-services-pattern-B/database#
$ sudo apt-get install freeglut3
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 graphviz : Depends: libglade2-0 (>= 1:2.6.1) but it is not going to be installed
            Depends: libgraphviz4 (>= 2.18) but it is not installable
            Depends: libgts-0.7-5 (>= 0.7.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
mperdikeas@mp-t420:~/archetypes/jax-rs/006-login-with-vanilla-REST-web-services-pattern-B/database#
$ sudo apt-get -f install freeglut3
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 graphviz : Depends: libglade2-0 (>= 1:2.6.1) but it is not going to be installed
            Depends: libgraphviz4 (>= 2.18) but it is not installable
            Depends: libgts-0.7-5 (>= 0.7.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
mperdikeas@mp-t420:~/archetypes/jax-rs/006-login-with-vanilla-REST-web-services-pattern-B/database#
$ sudo apt-get -f install graphviz
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  graphviz-doc
The following packages will be upgraded:
  graphviz
1 upgraded, 0 newly installed, 0 to remove and 185 not upgraded.
1 not fully installed or removed.
Need to get 0 B/677 kB of archives.
After this operation, 53.3 MB disk space will be freed.
(Reading database ... 256028 files and directories currently installed.)
Preparing to unpack .../graphviz_2.38.0-12ubuntu2_amd64.deb ...
Unpacking graphviz (2.38.0-12ubuntu2) over (2.38.0-1~saucy) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up graphviz (2.38.0-12ubuntu2) ...