Jetpack4.3 opencv install error

nfo: [ Disk Avail:26.37 GB ]
Info: NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP include 5 package
Info: [ Package PreInstall Started ]
Info: current working directory is /home/lihuawei/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310
Info: exec_command [target]:


#!/bin/bash
set -e

function safe_apt_install {
echo “*begin $1, $2”
tmp_log=/tmp/jetpack_dpkg_log.txt
sudo rm -f $tmp_log
set +e; $1 2>&1 | tee tmp_log; CMD_STATUS={PIPESTATUS[0]}; set -e
while [ ${CMD_STATUS} -ne 0 ]; do
if grep -q -e “is locked by another process” -e “E: Could not get lock /var/lib” $tmp_log; then
sudo rm -f $tmp_log
set +e; $1 2>&1 | tee tmp_log; CMD_STATUS={PIPESTATUS[0]}; set -e
echo "Waiting 2 seconds for apt to be available"; sleep {2}
else
echo “Unhandled error when running $1”; exit 1
fi
done
}
export LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
safe_apt_install “sudo apt-get update” 5
safe_apt_install “sudo apt-get install -y libtbb2 libtbb-dev” 5
safe_apt_install “sudo apt-get install -y python-dev python-numpy python-py python-pytest” 5


Info: exec_command: scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh li@192.168.55.1:~; ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no li@192.168.55.1 “~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh && rm -f ~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh”
*begin sudo apt-get update, 5

[sudo] password for li:

Get:1 file:/var/cuda-repo-10-0-local-10.0.326 InRelease

Ign:1 file:/var/cuda-repo-10-0-local-10.0.326 InRelease

Get:2 file:/var/cuda-repo-10-0-local-10.0.326 Release [574 B]

Get:2 file:/var/cuda-repo-10-0-local-10.0.326 Release [574 B]

Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic InRelease

Hit:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates InRelease

Hit:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-backports InRelease

Hit:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security InRelease

Hit:8 https://repo.download.nvidia.cn/jetson/common r32 InRelease

Get:9 https://repo.download.nvidia.cn/jetson/t186 r32 InRelease [2,554 B]

Get:10 https://repo.download.nvidia.cn/jetson/t186 r32/main arm64 Packages [7,930 B]

Err:10 https://repo.download.nvidia.cn/jetson/t186 r32/main arm64 Packages

File has unexpected size (8084 != 7930). Mirror sync in progress? [IP: 117.149.254.74 443]

Hashes of expected file:

  • Filesize:7930 [weak]

  • SHA256:a80383566cab2ea7baa68c7c17ac6f581b7ec47d376d832c1824d2fd1ab8916e

  • SHA1:268b9c78b441a358f804dab1b1c67c7c91ffbad7 [weak]

  • MD5Sum:6d1e8cb93e0f23410eecfd8007d2e4df [weak]

Release file created at: Tue, 17 Dec 2019 23:52:06 +0000

Fetched 2,554 B in 2s (1,121 B/s)

Reading package lists…

E: Failed to fetch https://repo.download.nvidia.cn/jetson/t186/dists/r32/main/binary-arm64/Packages.gz File has unexpected size (8084 != 7930). Mirror sync in progress? [IP: 117.149.254.74 443]

Hashes of expected file:

- Filesize:7930 [weak]

- SHA256:a80383566cab2ea7baa68c7c17ac6f581b7ec47d376d832c1824d2fd1ab8916e

- SHA1:268b9c78b441a358f804dab1b1c67c7c91ffbad7 [weak]

- MD5Sum:6d1e8cb93e0f23410eecfd8007d2e4df [weak]

Release file created at: Tue, 17 Dec 2019 23:52:06 +0000

E: Some index files failed to download. They have been ignored, or old ones used instead.

Unhandled error when running sudo apt-get update

Info: [ Package PreInstall Finished with Error ]
Info: [ 12.00 KB used. Disk Avail: 26.37 GB ]
Info: [ NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP Install took 6s ]
Error: Run commands failed at step PreInstall: command scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh li@192.168.55.1:~; ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no li@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

It’s also when i use the original sources!

Info: [ Disk Avail:26.35 GB ]
Info: NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP include 5 package
Info: [ Package PreInstall Started ]
Info: current working directory is /home/lihuawei/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310
Info: exec_command [target]:


#!/bin/bash
set -e

function safe_apt_install {
echo “*begin $1, $2”
tmp_log=/tmp/jetpack_dpkg_log.txt
sudo rm -f $tmp_log
set +e; $1 2>&1 | tee tmp_log; CMD_STATUS={PIPESTATUS[0]}; set -e
while [ ${CMD_STATUS} -ne 0 ]; do
if grep -q -e “is locked by another process” -e “E: Could not get lock /var/lib” $tmp_log; then
sudo rm -f $tmp_log
set +e; $1 2>&1 | tee tmp_log; CMD_STATUS={PIPESTATUS[0]}; set -e
echo "Waiting 2 seconds for apt to be available"; sleep {2}
else
echo “Unhandled error when running $1”; exit 1
fi
done
}
export LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
safe_apt_install “sudo apt-get update” 5
safe_apt_install “sudo apt-get install -y libtbb2 libtbb-dev” 5
safe_apt_install “sudo apt-get install -y python-dev python-numpy python-py python-pytest” 5


Info: exec_command: scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh li@192.168.55.1:~; ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no li@192.168.55.1 “~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh && rm -f ~/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh”
*begin sudo apt-get update, 5

[sudo] password for li:

Get:1 file:/var/cuda-repo-10-0-local-10.0.326 InRelease

Ign:1 file:/var/cuda-repo-10-0-local-10.0.326 InRelease

Get:2 file:/var/cuda-repo-10-0-local-10.0.326 Release [574 B]

Get:2 file:/var/cuda-repo-10-0-local-10.0.326 Release [574 B]

Hit:4 http://archive.canonical.com/ubuntu bionic InRelease

Get:5 http://cn.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]

Hit:8 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease

Hit:10 http://ports.ubuntu.com/ubuntu-ports bionic InRelease

Hit:9 https://repo.download.nvidia.cn/jetson/common r32 InRelease

Get:11 https://repo.download.nvidia.cn/jetson/t186 r32 InRelease [2,554 B]

Get:12 https://repo.download.nvidia.cn/jetson/t186 r32/main arm64 Packages [7,930 B]

Err:12 https://repo.download.nvidia.cn/jetson/t186 r32/main arm64 Packages

File has unexpected size (8084 != 7930). Mirror sync in progress? [IP: 36.156.21.81 443]

Hashes of expected file:

  • Filesize:7930 [weak]

  • SHA256:a80383566cab2ea7baa68c7c17ac6f581b7ec47d376d832c1824d2fd1ab8916e

  • SHA1:268b9c78b441a358f804dab1b1c67c7c91ffbad7 [weak]

  • MD5Sum:6d1e8cb93e0f23410eecfd8007d2e4df [weak]

Release file created at: Tue, 17 Dec 2019 23:52:06 +0000

Get:6 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]

Get:7 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]

Ign:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages

Ign:44 http://cn.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages

Ign:45 http://cn.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages

Ign:46 http://cn.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages

Ign:47 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages

Ign:48 http://cn.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages

Ign:49 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages

Ign:50 http://cn.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages

Ign:51 http://cn.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages

Ign:52 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 Packages

Get:53 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1,900 B]

Get:54 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 DEP-11 Metadata [8,284 B]

Get:55 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe DEP-11 48x48 Icons [29 B]

Get:56 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe DEP-11 64x64 Icons [29 B]

Ign:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages

Ign:44 http://cn.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages

Ign:45 http://cn.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages

Ign:46 http://cn.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages

Ign:47 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages

Ign:48 http://cn.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages

Ign:49 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages

Ign:50 http://cn.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages

Ign:51 http://cn.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages

Ign:52 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 Packages

Ign:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages

Ign:44 http://cn.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages

Ign:45 http://cn.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages

Ign:46 http://cn.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages

Ign:47 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages

Ign:48 http://cn.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages

Ign:49 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages

Ign:50 http://cn.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages

Ign:51 http://cn.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages

Ign:52 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 Packages

Err:13 http://cn.archive.ubuntu.com/ubuntu bionic/main arm64 Packages

404 Not Found [IP: 91.189.91.14 80]

Ign:44 http://cn.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages

Ign:45 http://cn.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages

Ign:46 http://cn.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages

Err:47 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages

404 Not Found [IP: 91.189.91.14 80]

Ign:48 http://cn.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages

Ign:49 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages

Ign:50 http://cn.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages

Err:51 http://cn.archive.ubuntu.com/ubuntu bionic-backports/main arm64 Packages

404 Not Found [IP: 91.189.91.14 80]

Ign:52 http://cn.archive.ubuntu.com/ubuntu bionic-backports/universe arm64 Packages

Fetched 408 kB in 12s (34.5 kB/s)

Reading package lists…

E: Failed to fetch https://repo.download.nvidia.cn/jetson/t186/dists/r32/main/binary-arm64/Packages.gz File has unexpected size (8084 != 7930). Mirror sync in progress? [IP: 36.156.21.81 443]

Hashes of expected file:

- Filesize:7930 [weak]

- SHA256:a80383566cab2ea7baa68c7c17ac6f581b7ec47d376d832c1824d2fd1ab8916e

- SHA1:268b9c78b441a358f804dab1b1c67c7c91ffbad7 [weak]

- MD5Sum:6d1e8cb93e0f23410eecfd8007d2e4df [weak]

Release file created at: Tue, 17 Dec 2019 23:52:06 +0000

E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.14 80]

E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.14 80]

E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.14 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

Unhandled error when running sudo apt-get update

Info: [ Package PreInstall Finished with Error ]
Info: [ 36.00 KB used. Disk Avail: 26.35 GB ]
Info: [ NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP Install took 29s ]
Error: Run commands failed at step PreInstall: command scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tmp_NV_L4T_OPENCV_TARGET_POST_INSTALL_COMP.sh li@192.168.55.1:~; ssh -t -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no li@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

Hi,

Could you check if “sudo apt-get update” hits any issue on your host?

1 Like

There is no issue on my host.But I use another sources at first.

This helped me