Install graphviz > 2.30 on Amazon Linux 2

Hey guys,

just wanted to ask what the best option is to install the most recent version of graphviz on Amazon Linux 2 EC2 Instance.
When I do a yum list | grep graphviz there I´m getting just the 2.30 version which is from 2018 :frowning:

Thanks guys and Greetings,

Julian

Is it a possibility to use a newer operating system? I think on EC2 you usually get to choose which OS you’re running?

If not, download the Graphviz source package and compile it on your machine? https://graphviz.org/download/source/

Sometimes I wonder if we should offer a statically linked version of Graphviz for situations like this. It sure is convenient when using go-based tools to download a pre-compiled binary and just run it…

Not that I really know how to make that work though :slight_smile:

I do. I have an upcoming MR that enables this in CI, but it’s queued behind a lot of other stuff. If there’s a strong interest to have it, I can prioritize it.

Hey there,

uhmmmm, I have a strong interest :smiley: … not sure, if you need more guys with a “strong interest” to really push it forward in your queue.
But in any way thanks for your reply…

1 Like

for the time being we installed docker on the ec2 machine and used an apline linux to get a newer version there.
Now we at least have 2.47.

I have had multiple requests – both public and private – for a static binary. Part of this surely stems from the major Linux package ecosystems only having outdated versions of Graphviz. It would be great to see updated Graphviz versions in these package repositories, but we rely on downstream volunteers to do this work.

I’m looking into this now.

I’ve submitted a draft MR now, but we need sort out at least one problem before we can merge it.

Any tips on building from source? I’m also trying to deploy on Amazon Linux 2 (elastic beanstalk), the default configuration does install, but when I try and import in python, it can’t find gvFreeRenderData (which I can see in /usr/local/include/graphviz/gvc.h):
ImportError: /var/app/venv/staging-LQM1lest/lib64/python3.8/site-packages/pygraphviz/_graphviz.cpython-38-x86_64-linux-gnu.so: undefined symbol: gvFreeRenderData

Presumably I need to install something somewhere else or tell it where to look, but am unsure how to do this.

If anyone else is stuck with a similar problem, I used the following configuration options:
./configure --enable-python3=yes --exec-prefix="/usr"

And specified the locations of include and lib when installing pygraphviz:
pip install pygraphviz --global-option=build_ext --global-option="-I/usr/include/graphviz" --global-option="-L/usr/lib/graphviz/"