I have a script installing graphviz-dev on my machines. The relevant line is sudo apt install graphviz-dev
In Ubuntu 16.04 it installs a package called graphviz-dev, and dpkg -s graphviz-dev
will return a good response
However, on Ubuntu 18.04 it installs a different package - libgraphviz-dev, and now dpkg -s graphviz-dev
won't work, but dpkg -s libgraphviz-dev
would.
Is there a better way to check if the installation of said package (graphviz-dev
) was successful, even if APT decided to redirect and install a different package instead?
As far I can see the package description for
*graphviz-dev
is always the same (looked from 16.04 LTS to upcoming 20.04 LTS):so you can use simple
dpkg -l
with pipe and one-line scripting:For example on 16.04 LTS it will return:
You can install
*graphviz-dev
in universal way like below: