Ubuntu ARM更改为国内源

关键词:ubuntu  arm  ubuntu-ports  国内源  镜像  阿里源  apt apt-get install update  0%working  速度慢  rk3399  开发板

写在前面

这几次写博客客都是有很大的戾气!

算了,认真做事,认真记录吧。要乐观一点少年。

 

arm ubuntu开发板的apt的库和普通ubuntu的库是不一样的,arm的是ubuntu-ports库。

百度也是垃圾,搜半天也搜不到一个说阿里源的ubuntu-ports的设置方法。

 

之前用USTC中科大的ubuntu-ports,不知道咋回事,apt-get update后一直卡在0%working,晕。简单来说,就是你要换一个源了,我不知道是这个源有问题,还是我开发板有问题,还是线路有问题。。。

 

其实你发现,很多镜像网站,都只有ubuntu源的设置说明,没有ubuntu-ports的设置说明。只有USTC都有,然而我用不了。

 

正文

阿里云镜像网站:https://opsx.alibaba.com/mirror

里面有ubuntu源的设置说明

以ubuntu16.04为例:

ubuntu 16.04 配置如下

ubuntu 16.04 配置如下
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

  

所以只要将ubuntu改成ubuntu-ports即可,这是我观察USTC的设置说明总结的,已经在我的板子上实验成功。

ubuntu 16.04 for arm 配置如下:

ubuntu 16.04 配置如下
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial main

deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates main

deb http://mirrors.aliyun.com/ubuntu-ports/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial universe
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-security universe

  

你也可以同样的方法去改其它的镜像网站的源。

 

搞之前,别忘了把自带的源给备份一下,稳妥一点嘛! 

 

2019.7.6 更新

对于ubuntu 18.04的ARM

 

# 默认注释了源码镜像以提高 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

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse

 

posted @ 2019-01-24 17:07  立冬以东  阅读(27336)  评论(3编辑  收藏  举报