To install dependencies, you need to run: sudo apt-get install libyara-dev.
sudo apt-get install libyara-dev