Installing suricata from git fails

Hello,

I have forked the suricata git repo to try and contribute but I am having trouble building on my ubuntu system. I am getting the error:

checking for cbindgen... no
  Warning: cbindgen too old or not found, it is required to 
      generate header files.
  To install: cargo install --force cbindgen
configure: error: cbindgen required

Even after following the instructions listed here: Ubuntu Installation from GIT - Suricata - Open Information Security Foundation (openinfosecfoundation.org)

I have tried installing cbindgen with/without sudo and have even tried passing the environment with sudo -E. Any advice?

Thanks in advance!

Hey @joser12345678!

Have you also added path to your cargo binaries to your PATH variable?

It should look something like this:
export PATH=$PATH:${HOME}/.cargo/bin

Please note that this line only exports/modifies this variable in your current shell. To make the change permanent you can put into your e.g. ~/.bashrc file for the variable to be exported every time you log in.

If you have it set up correctly then you should be able to do e.g.
cbindgen --version

Not sure what is your Ubuntu version but you might also try installing cbindgen directly with sudo apt-get install cbindgen

Cheers,
Lukas

Thank you for the quick response.

I did export the binary path to my PATH variable. Running cbindgen --version gave an output as expected. The fix was indeed installing cbindgen directly with apt-get! Good call!