Jetson TX2修改apt源

Note:

  • Jetpack4.2/4.3刷机过后的系统版本为ubuntu18.04
  • TX2 本身 为ARM64架构的 CPU

0. 备份

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

1. 查询发行版本号:lsb_release -c

Codename:          bionic

2. 打开源文件:sudo nano /etc/apt/sources.list, 注释掉原有内容,复制以下内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse

Ctrl+O保存,回车确定,Ctrl+x退出

3. 更新:sudo apt-get update

4. 可能出现的问题

宿主机的apt-get无法正确使用。原因是自带的刷机包(Jetpack/DriveInstall)给系统安装了arm64的软件包,报错如下:

Err:29 http://archive.ubuntu.com/ubuntu xenial/main arm64 Packages
  404  Not Found [IP: 91.189.88.161 80]
Ign:37 http://archive.ubuntu.com/ubuntu xenial/universe arm64 Packages
Ign:40 http://archive.ubuntu.com/ubuntu xenial/multiverse arm64 Packages
Err:46 http://archive.ubuntu.com/ubuntu xenial-updates/main arm64 Packages
  404  Not Found [IP: 91.189.88.161 80]

正确的解决方案为,修改/etc/apt/source.list在每一行的deb和http://×××中间加入[arch=amd64,i386],修改后的source.list文件如下(仅供参考,请按需修改):

deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic universe
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates universe
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic multiverse
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates multiverse
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security universe
deb [arch=amd64,i386] http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security multiverse
deb  [arch=amd64,i386]  http://archive.ubuntu.com/ubuntu bionic universe

参考文献

https://blog.csdn.net/jiangchao3392/article/details/73251850
https://blog.csdn.net/QLULIBIN/article/details/80271096
http://s1nh.org/post/arm64-after-jetpack/

你可能感兴趣的:(Jetson TX2修改apt源)