Requirements
Repository
- G++ & pcre library
- Build Essentials
- G++
- Libpcre3
- Libpcre3-dev
sudo apt-get install build-essentials g++ libpcre3 libpcre3-dev
Yara
Go to Yara project site and download yara source code, extract and compile it. (currently it is at version 1.6.)
cd yara-source/
./configure && make && sudo make install
Installation
Yara ruby-gem
sudo gem install yara
I then tried to load the library in IRB but ended up with this error
irb(main):001:0> require 'yara'
LoadError: libyara.so.0: cannot open shared object file: No such file or directory - /var/lib/gems/1.9.1/gems/yara-1.6.0/lib/yara_native.so
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /var/lib/gems/1.9.1/gems/yara-1.6.0/lib/yara.rb:18:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from (irb):1
from /usr/bin/irb1.9.1:12:in `<main>'
Library problems
libyara.so.0 is located in /usr/local/lib/libyara.so.0. To fix this added path to /etc/ld.so.conf and ran ldconfig
sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf" && sudo ldconfig
Ingen kommentarer:
Legg inn en kommentar