Failed to install OPENCV using SDK manager

When I am trying to install Jetpack 4.2 using SDK manager, the process would always stop at installing OPENCV. The terminal showed that
05:06:01 INFO : OpenCV on Target : E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/p/python2.7/libpython2.7-dev_2.7.15-4ubuntu4~18.04_arm64.deb Connection failed [IP: 2001:67c:1360:8001::22 80]
05:06:01 INFO : OpenCV on Target : E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
05:06:01 INFO : OpenCV on Target : Unhandled error when running sudo apt-get install -y python-dev python-numpy python-py python-pytest
05:06:01 INFO : OpenCV on Target : exit status 1
05:06:01 INFO : OpenCV on Target : [ Package Install Finished with Error ]
05:06:01 ERROR : OpenCV on Target : NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP command scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh nvidia@192.168.55.1:~; ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no nvidia@192.168.55.1 “~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh && rm -f ~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh” finished with error
05:06:01 INFO : OpenCV on Target :
05:06:01 INFO : OpenCV on Target : [ 22.99 MB used. Disk Avail: 50.00 GB ]
05:06:01 INFO : OpenCV on Target : [ NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP Install took 9m5s ]
05:06:01 INFO : OpenCV on Target : command scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh nvidia@192.168.55.1:~; ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no nvidia@192.168.55.1 “~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh && rm -f ~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh” finished with error
05:06:01 ERROR : OpenCV on Target : command terminated with error

The address “2001:67c:1360:8001::22” is the IPv6 version of Canonical’s repository. Basically their web server (non-SSL port 80) access failed. If I directly place the actual address in a web browser I get the download:
[url]http://ports.ubuntu.com/ubuntu-ports/pool/main/p/python2.7/libpython2.7-dev_2.7.15-4ubuntu4~18.04_arm64.deb[/url]

Are you behind a proxy or firewall? What happens if you place the above http URL directly into a browser?

Thanks for your reply. There is no problem with direct access. I got the same download link and was able to download this file.

So if access works, then perhaps it was use of the item which was accessed which actually failed. Note:

Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

You might try this on both host and Jetson (if you flash, then just run this after flash and prior to the software install):

sudo apt update
sudo apt --fix-broken install
sudo apt upgrade

Note that after a fresh install the Jetson itself may be unavailable for new package install for quite some time simply from the fact that it is doing regular updates and the initial update is enormous (and time consuming). Make sure the Jetson has been manually updated as per the above before starting, and even if technically it was the Jetson blocking install I would still recommend running that on the host.

A lot of people end up missing python 2 on the host, so you might do this as an additional step on host (the default for Ubuntu 18.04 is python 3):

sudo apt-get install python

I have tried your method and it’s working now! Thanks!!