packages installation with yum
Install graphviz
yum install graphviz
install graphviz development libraries and includes:
yum install graphviz-devel
register the plugins (for rendering, etc)
export LD_LIBRARY_PATH=/usr/lib64:/usr/lib64/graphviz:${LD_LIBRARY_PATH}
[root@r01edge pkgconfig]# export prefix=/usr/lib64
dot -c
list installed plugins:
dot -v
dot - graphviz version 2.30.1 (20201013.1554)
libdir = "/usr/lib64/graphviz"
Activated plugin library: libgvplugin_pango.so.6
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.so.6
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
/usr/lib64/graphviz/config6
was successfully loaded.
render : cairo dot fig gd map pic pov ps svg tk vml vrml xdot
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : bmp canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gtk gv ico imap imap_np ismap jpe jpeg jpg pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp x11 xdot xlib
loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg xbm
no root access
if there is no access to root, or there is a need to install it your home directory the following procedure could be used:
- download the rpm :
wget http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/graphviz-2.30.1-22.el7.x86_64.rpm
--2020-12-24 19:31:02-- http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/graphviz-2.30.1-22.el7.x86_64.rpm
Resolving rpmfind.net (rpmfind.net)... 195.220.108.108
Connecting to rpmfind.net (rpmfind.net)|195.220.108.108|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1330968 (1.3M) [application/x-rpm]
Saving to: ‘graphviz-2.30.1-22.el7.x86_64.rpm’100%[====================================================================================================================================================================>] 1,330,968 430KB/s in 3.0s
2020-12-24 19:31:06 (430 KB/s) - ‘graphviz-2.30.1-22.el7.x86_64.rpm’ saved [1330968/1330968]
- place it in your home directory
- convert the rpm into a cpio: rpm2cpio graphviz-2.30.1-22.el7.x86_64.rpm >graphviz-2.30.1-22.cpio
- unarchive: cpio -ivd <graphviz-2.30.1-22.cpio
- rename usr to graphviz: mv usr graphviz
- set the prefix to the graphviz location: export prefix=/home/dataexplorer2/graphviz
- set LD_LIBRARY_PATH: export LD_LIBRARY_PATH=${prefix}/lib:${prefix}/lib/graphviz:${LD_LIBRARY_PATH}
- set PATH: export PATH=${prefix}/bin:${PATH}
- create links in lib64 directory of graphviz:
- ln -s libpathplan.so.4.0.0 libpathplan.so
- ln -s libcdt.so.5.0.0 libcdt.so
- ln -s libcgraph.so.6.0.0 libcgraph.so
- ln -s libxdot.so.4.0.0 libxdot.so
- ln -s libgvc.so.6.0.0 libgvc.so
- register plugins: dot -c
- verify plugins: dot -v
download the development package:
- wget http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/graphviz-devel-2.30.1-22.el7.x86_64.rpm
- rpm2cpio graphviz-devel-2.30.1-22.el7.x86_64.rpm >graphviz-devel-2.30.1-22.cpio
- copy include directory from usr to your graphviz location:
- cd usr
- cp -r include ${prefix}