.deb binary installation

I use Ubuntu 22.04. I tried to install graphviz .deb file. It seemed to be installed but I couldn’t use it, it always gave me the error do dot -c first. I tried it to no avail.

Then, I installed it with apt install graphviz. It installs 2.43 version. Then I wanted to update it to the latest version. I downloaded .deb file again and installed it. It didn’t give any errors. But when I dot -version, it says graphviz 2.43, not 9.0.0.

What am I doing wrong? Thanks in advance.

This is the unfortunate result of two things:

  1. The version of Graphviz is actually answered by the library rather than the binary. dot from 9.0.0 is loading the libraries from 2.43 and thus misreporting its version. But this only happens because…
  2. The rpaths for binaries and libraries are not set correctly. This is a long standing issue. We really need an rpath expert to look at the Graphviz build systems and figure out what is being done wrong.

As a work around you can set some environment variables to teach dot to load the right libraries, env LD_LIBRARY_PATH=/path/to/graphviz/lib /path/to/graphviz/bin/dot