The system source will involve the speed of downloading software on the terminal, and it is often necessary to replace it with a domestic source. Such as Tsinghua University, Aliyun, etc.
1、 Back up the original source
sudo chmod 777/etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.backup
2、 Modify source
sudo gedit /etc/apt/sources.list
A box will pop up. Delete the content inside and replace it with the following content
Ali Cloud
# deb package
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
## Beta source
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Source code
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
## Beta source
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical partners and add-ons
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
Tsinghua source: https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
After replacing, click Save to close the file. Update the source, let the source take effect
sudo apt-get update
1、 Generate pip configuration file
mkdir ~/.pip
sudo gedit ~/.pip/pip.conf
Delete the content in the pop-up window and write:
[ global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[ install]
trusted-host=mirrors.aliyun.com
Click Keep, the key file, the replacement source is completed.
Errors are often reported when installing packages, such as
sudo apt-get install libpython2.7-stdlib=2.7.12-1ubuntu0-16.04.3
Keep searching like this, install the layers of dependent packages, and finally install the packages we need to install.
sudo aptitude install libprotobuf-dev
sudo apt-get autoremove python3.4
http://old-releases.ubuntu.com/releases/
To be continued
Recommended Posts