There is such a step in the tutorial of installing opencv4.4.0. When configuring cmake-gui, select OPENCV_ENABLE_NONFREE(SURF patent problem), so that the above installation problems will not occur in the subsequent installation process.