opencv4.pc-sample For command pkg-config --modversion opencv4 does not work. You need to modify this file by your opencv version and lib location.