As we know, opencv is very popular computer visio library and we are using the library our tasks. In ubuntu 17.04 sometimes, opencv's installition is becoming annoying. Corrupted "OpenCV" files and "cmake" that are not properly set are causing this problem. I use the links below which I downloaded from OpenCV from git account. Remember to keep your Linux distribution up to date. Let's start the installition:
If you get error when write the cmake code, you have to delete build folder and have to create new (empty) build folder. After that you must use "cmake -D ." line again.
Folder delete code linux: sudo rm -rf build