python - Cannot open shared object file: No such file or directory error while using yara module in Virtualenv -


problem:

i tried install yara in virtualenv , succesful while running app error keep on coming , tried sys link missing library error not rectified.

log:

(venv) root@corpus:/var/www/flaskapp/flaskapp# python __init__.py failed import '/var/www/flaskapp/flaskapp/venv/lib/libyara.so' path = /var/www/flaskapp/flaskapp/venv/bin:/var/www/flaskapp/flaskapp/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin;/var/www/flaskapp/flaskapp/venv/lib traceback (most recent call last):   file "__init__.py", line 26, in <module>     yara_scanner_kiran.yara_detect import yaraclass   file "/var/www/flaskapp/flaskapp/ya/ya.py", line 10, in <module>     import yara   file "/var/www/flaskapp/flaskapp/venv/local/lib/python2.7/site-packages/yara/__init__.py", line 7, in <module>     yara.rules import compile   file "/var/www/flaskapp/flaskapp/venv/local/lib/python2.7/site-packages/yara/rules.py", line 17, in <module>     yara.libyara_wrapper import *   file "/var/www/flaskapp/flaskapp/venv/local/lib/python2.7/site-packages/yara/libyara_wrapper.py", line 315, in <module>     libyaradll = cdll.loadlibrary(library)   file "/usr/lib/python2.7/ctypes/__init__.py", line 440, in loadlibrary     return self._dlltype(name)   file "/usr/lib/python2.7/ctypes/__init__.py", line 362, in __init__     self._handle = _dlopen(self._name, mode) oserror: /var/www/flaskapp/flaskapp/venv/lib/libyara.so: cannot open shared object file: no such file or directory 

solution tried:

sudo ln -s /usr/local/lib/libyara.so /usr/lib/libyara.so 

other solution tried:

download source tarball , prepared compiling it: tar -zxf yara-3.5.0.tar.gz cd yara-3.5.0 ./bootstrap.sh make sure have automake, libtool, make , gcc installed in system. ubuntu , debian users can use:  sudo apt-get automake libtool make gcc if plan modify yara’s source code may need flex , bison generating lexers , parsers:  sudo apt-get flex bison compile , install yara in standard way:  ./configure make sudo make install 

any suggestion on how solve problem ?


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -