NateF's Blog - APT源
type: channel
link: https://blog.sc.cn/tag/APT%E6%BA%90/
items: 如何正确地给Armbian-Bionic换源

如何正确地给Armbian-Bionic换源
type: item
date: 2020-03-10T12:08:00+08:00
description: 前言原本打算是买RaspberryPi4的，结果...我的钱全拿来买游戏了然后一星期前在淘宝逛了逛，康见一个叫OrangePi的板子，我买的OrangePiPC只要100+，贼**便宜我果断下单了，昨天成功到手，舒服But，这款板子除了便宜，对比RaspberryPi NanoPi没有一点优势，资料少得可怜再者这买过来就一个裸板，幸亏我在家找到了5V2.5A的DC电源，还买了张32G TF但是啊，100+的1G Ram板子要什么自行车啊卧槽换系统本来想着有Centos7的，结果Centos6都没有就尼玛离谱在官网下的Ubuntu Debian镜像也有些蜜汁问题，最后找到了Armbian里面有Bionic和Buster之分，前者是Ubuntu，后者是Debian1G Ram，我果断下载了Debian的版本，结果安装Python时出现了一堆问题...然后我又换到了Ubuntu版翻车进入SSH，通过lsb_release -a查看系统信息root@orangepipc:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionicUbuntu 18 LTS Bionic百度到了中科大的Ub Bionic源，换上是不是以为就结束了？没有，没这么简单安装Python时还是出现了问题，要不就没安装pip，装上pip后又是什么distutils没装在经过各种尝试，安装python3-dev python3-distutils等各种方式均安装不上我开始怀疑人生了，我百思不得其解，突然灵光一闪，才想到我这是arm系统啊，不能用正常的源于是，我换上了中科大的Arm源换源备份[/etc/apt/source.list]文件mv /etc/apt/source.list /etc/apt/source.list.bak编辑[/etc/apt/source.list]文件vi /etc/apt/source.list在里面输入，按下Esc输入:wq保存deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-proposed main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-proposed main multiverse restricted universe deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe最后，更新apt-get源sudo apt-get update结语到这里就大功告成啦，接下来安装想要的东西就行了比如我，安装pip3sudo apt-get install python3-pip