Upgrade opencv to 4.5.5

Hi,

In Ubuntu 20.04, OpenCV4.2.0 is installed I wanted to upgrade to 4.5.5 I have followed built from source manual. All builds smooth but after I check with pkg-config --modversion opencv4, it displays only 4.2.0. Any ideas will help me a lot. In raspberry PI, I just flash new os and begin, Thats not the case now.

How to completely delete opencv built from source.

support for pkg-config is deprecated / disabled by default
(that’s why it does not find it)

add -DOPENCV_GENERATE_PKGCONFIG=ON to your cmake cmdline to re-enable it

make unistall

(from the build folder) should do the trick.
but probably, you should uninstall 4.2.0 instead / first !

Thanks Berak.
Thats a great support.