While trying to install opencv in Raspberry pi, I got this message while doing cmake

        Couln't connect to server from the Internet.
        Perhaps direct connections are not allowed in the current network.
        To use proxy please check/specify these environment variables:
        -and/or HTTP_PROXY/HTTPS_PROXY
    CMake Warning at /home/pi/opencv-3.3.1/cmake/OpenCVDownload.cmake:188(message):
tiny-dnn: Download failed: 7;"Couldn't connect to server"

For details please refer to the log file:


I am using college network, and hence did the settings as suggested here and here.However, I get Configuration complete and that the files have been generated at the end of cmake. sudo make clean happens properly. But on doing sudo make, it reached 83% and gave us this error: error while doing make

/home/pi/opencv_contrib-3.3.1/modules/xfeatures2d/src/boostdesc.cpp:646:37:fatal error:boostdesc_bgm.i: No such file or directory
                  #include "boostdesc_bgm.i"
compilation terminated.
modules/xfeatures2d/CmakeFiles/opencv_xfeatures2d/build.make:91: recipe for target 'modules/xfeatures2d/CmakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o' failed
make[2]: *** [modules/xfeatures2d/CmakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o] Error 1
CMakeFiles/Makefile2:17509: recipe for target 'modules/xfeatures2d/CMakeFiles/opencvc_xfeatures2d.dir/all' failed
make[1]: *** [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

I am unable to resolve this. Please help.


  • 2
    Please past in the text, pictures is hard to interpret and will decrease your chance to get assistance.
    – MatsK
    Commented Jan 14, 2018 at 14:46
  • Thanks for the suggestion @MatsK , have pasted the text. Thanks !
    – Dexter
    Commented Jan 14, 2018 at 15:54
  • You have truncated to much info! Whats left only say it fails, the clue to why could be present in the text before what you have pasted in.... As in the first picture Cmake have a log, attaching it would help.
    – MatsK
    Commented Jan 14, 2018 at 17:21
  • Did you just plug into the school's network? Is the network open for you to do that? Many schools have the network locked down unless you're using their specified public network. Go thru connectivity checks as listed below. Ping the gateway router. Then ping Then ping google.com. The first one tells you you're on the network. The second one tells you you have access to the web. The third tells you if the DNS is working. That should help you quickly focus on what is wrong where. Commented Jan 21, 2018 at 2:13

2 Answers 2


Try copying all the '*.i' file in the folder 'opencv-3.3.1/build/downloads/xfeatures2d/' to 'opencv_contrib-3.3.1/modules/xfeatures2d/src/' then try using make.

Also please check CmakeDownloadLog.txt from build folder for details (located at /home/pi/opencv-3.3.1/build/CMakeDownloadLog.txt).

As a note, don't forget to have both curl and wget installed and updated (maybe the old version doesn't support SSL).


could this be an internet connection issue, or nameserver issue. Can you ping to a website (e.g. ping www.google.com)? If not, can you ping to an external IP address (e.g.

In case you can ping to an external IP address, but not to a website, check your configuration files, and either update /etc/dhcpcd.conf or /etc/resolv.conf (add line nameservers).

In case you can also not ping to an external IP, then there is an IP configuration issue on your PI, or, port (or firewall) issue on the router.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.