1. 程式人生 > 其它 >GDB常用命令整理

GDB常用命令整理

linux系統預設是國外的源,速度很慢,國內的源有的上不去,有的包無法安裝,經過測試清華大學的源完美可用,現放上教程

首先備份原本的source.list檔案

 

1 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak    #為防止誤操作後無法恢復,先備份原檔案sources.list
2 sudo gedit /etc/apt/sources.list  

然後刪除所有內容,複製

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe

到sources.list後儲存,之後開啟終端輸入

sudo apt-get update

就可以了。