Source Link
Open the Terminal and write the following commands.
1-Update and upgrade package your system ubuntu:
sudo su
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
2-Installing Dependenices:
sudo apt-get install libopencv...