yara
yara copied to clipboard
Error when compiling on Ubuntu 20.04
Hi,
I have followed the instructions of the official documentation but I have the following errors:
$ tar -zxf yara-4.1.0.tar.gz
$ cd yara-4.1.0
$ ./bootstrap.sh
$ ./configure
Errors during the execution of the ./configure command:
./configure: line 11371: syntax error near unexpected token `PROTOBUF_C,'
./configure: line 11371: ` PKG_CHECK_MODULES(PROTOBUF_C, libprotobuf-c >= 1.0.0)'
I have the same problem on debian 9 with autotools 1.16 (but not on debian 10 with autotools 1.16.1). Which version of autotools are you using?
This may happen because pkg-config
is not installed, see: #1171
@Churam I am on Ubuntu 20.04.3 LTS with autotools-dev
version 20180224.1.
@plusvic pkg-config
is installed on the machine.
The packages required for build are installed :
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=================-============-=====================================================
ii automake 1:1.16.1-4ubuntu6 all Tool for generating GNU Standards-compliant Makefiles
ii bison 2:3.5.1+dfsg-1 amd64 YACC-compatible parser generator
ii flex 2.6.4-6.2 amd64 fast lexical analyzer generator
ii gcc 4:9.3.0-1ubuntu2 amd64 GNU C compiler
ii libtool 2.4.6-14 all Generic library support script
ii make 4.2.1-1.2 amd64 utility for directing compilation
ii pkg-config 0.29.1-0ubuntu4 amd64 manage compile and link flags for libraries
vagrant@ubuntu20-desktop:~/Tools/yara-4.1.2$
I'm having the same issue. Did you ever find a fix?
Ok so the workaround that seemed to have worked for me was downgrade to yara 4.0.5 build. And then upgrade to the latest. Unsure why this worked but it did.
Edit: really seems to have to do with the order of package installing. "pkg-config" did fix the issue but not if it was installed at later time. So doing a ./bootstrap.sh & ./configure didn't fix the issue if pkg-config was installed after the other steps. But when i did a full reinstall of my VM with the correct order it did work.
@EYIDC
Yes, I can confirm on 22.04. If you're missing pkg-config
and ./configure
stops, you will need to start fresh after installing that package. No need to blow out the whole VM, but deleting the yara directory and extracting the tar archive again does the trick.
Maybe make clean
would do the trick too, instead of having to delete the whole yara directory.