9
votes

Hi I must convert a graph (a .dot) to a map and to a png because I must generate dependencies graph with doxygen using graphviz. But I have a error:

 error: problems opening map file

If I do dot -v I have

dot - graphviz version 2.38.0 (20140413.2041)
libdir = "/usr/local/lib/graphviz"
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/local/lib/graphviz/config6
was successfully loaded.
render  :  dot fig map pic pov ps svg tk vml xdot
layout  :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp
twopi
textlayout  : 
device  :  canon cmap cmapx cmapx_np dot eps fig gv imap imap_np ismap                    
pic plain plain-ext pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 
loadimage   :  (lib) eps gif jpe jpeg jpg png ps svg

There isn't map and png for render

Moreover if I do dot -Tpng

Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np   
dot eps fig gv imap imap_np ismap pic plain plain-ext pov ps ps2 svg 
tk vml vmlz xdot xdot1.2 xdot1.4

It seem that I have not the library for png and map. How can I fix the problem? (I do not remember how at the time I installed grapghviz) (I'm working on Linux SO)

3

3 Answers

18
votes

Graphviz plugins need to be registered before they can be used. In Windows, open the command prompt as admin and type dot -c to register. You can verify it by typing dot -v

6
votes

I had the same problem on Centos 7 and I was able to solve it by installing the graphviz-gd package with the command yum install graphviz-gd

After the installation I executed dot -c and now dot -v shows the following devices:

canon cmap cmapx cmapx_np dot eps fig gd gd2
gif gv imap imap_np ismap jpe jpeg jpg pic plain
plain-ext png pov ps ps2 svg svgz tk vml vmlz
vrml wbmp xdot xdot1.2 xdot1.4

Moreover I use the cmapx to create the map file. Regards, nemo

0
votes

I had same issue on macos 10.14. Solved the issue by reinstalling graphviz, and somehow it says 'not linked' as following

Warning: graphviz 2.47.3 is already installed, it's just not linked. To link this version, run: brew link graphviz

So end up with the following two commands:

brew install -f -s graphviz    
brew link --overwrite graphviz