GithubHelp home page GithubHelp logo

Error during compilation on Linux about go-yara HOT 5 CLOSED

hillu avatar hillu commented on August 21, 2024
Error during compilation on Linux

from go-yara.

Comments (5)

hillu avatar hillu commented on August 21, 2024

Hi Florian,

It looks like the linker can't find YARA. Where did you install the library?

Cheers,
-Hilko

from go-yara.

Neo23x0 avatar Neo23x0 commented on August 21, 2024

Uh - I noticed that I have several libyara versions installed.

301793    4 -rw-r--r--   1 root     root         1163 Jan 30 11:02 /usr/i686-w64-mingw32/include/yara/libyara.h
301768    4 -rwxr-xr-x   1 root     root          889 Jan 30 11:02 /usr/i686-w64-mingw32/lib/libyara.la
301770  388 -rw-r--r--   1 root     root       396500 Jan 30 11:02 /usr/i686-w64-mingw32/lib/libyara.a
677515    4 -rw-r--r--   1 root     root         1163 Jan 31 18:57 /usr/local/include/yara/libyara.h
677546  168 -rwxr-xr-x   1 root     root       171432 Jan 29 18:42 /usr/local/lib/libyara.so.2.1.0
678744   20 -rw-r--r--   1 root     staff       18322 Feb 23  2015 /usr/local/lib/python2.7/dist-packages/yara/libyara_wrapper.pyc
678731   20 -rw-r--r--   1 root     staff       20089 Feb 23  2015 /usr/local/lib/python2.7/dist-packages/yara/libyara_wrapper.py
677490  264 -rwxr-xr-x   1 root     root       268067 Feb 23  2015 /usr/local/lib/libyara.so.3.2.0
657803    0 lrwxrwxrwx   1 root     root           16 Jan 31 18:57 /usr/local/lib/libyara.so.3 -> libyara.so.3.4.0
657458  344 -rwxr-xr-x   1 root     root       351117 Jan 31 18:57 /usr/local/lib/libyara.so.3.4.0
677491    4 -rwxr-xr-x   1 root     root          954 Jan 31 18:57 /usr/local/lib/libyara.la
660551    0 lrwxrwxrwx   1 root     root           16 Jan 31 18:57 /usr/local/lib/libyara.so -> libyara.so.3.4.0
677547    0 lrwxrwxrwx   1 root     root           16 Jan 29 18:42 /usr/local/lib/libyara.so.2 -> libyara.so.2.1.0
677493  408 -rw-r--r--   1 root     root       417378 Jan 31 18:57 /usr/local/lib/libyara.a
268743    0 lrwxrwxrwx   1 root     root           10 Jul 11  2015 /usr/lib/libyara.so.0 -> libyara.so
263510  212 -rwxr-xr-x   1 root     root       215817 Feb 23  2015 /usr/lib/libyara.so

I tried to use export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" and included /usr/local/lib in /etc/ld.so.conf.d/yara.conf.

Maybe I should remove some older versions?

Thank you!

from go-yara.

hillu avatar hillu commented on August 21, 2024

You should definitely get rid of yara versions 2.1.0 and 3.2.0 in /usr/local. go-yara needs version 3.4 or a later git snapshot of yara. What version does /usr/lib/libyara.so have on your system?

Setting the CGO_LDFLAGS environment variable to -L/usr/local may work for you.

from go-yara.

Neo23x0 avatar Neo23x0 commented on August 21, 2024

Awesome!!
I removed all old libraries and references and now I can import and use it. I've forgotten that I installed older versions of yara on this VM system before. (several times .. it seems)
Many thanks!

screen shot 2016-02-01 at 14 33 57

from go-yara.

hillu avatar hillu commented on August 21, 2024

Nice. I'll put a note about the sort of linker error you encountered into the README.

from go-yara.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.