- References
- 修改apt源
- 在Ubuntu中添加和删除PPA的软件源
- Error
- N: Skipping acquire of configured file 'universe/binary-i386/Packages' as repository 'http://miktex.org/download/ubuntu' bionic InRelease' doesn't support architecture 'i386'
- error: Could not get lock /var/lib/dpkg/lock
- error: dpkg frontend is locked by another process
- error: http://mirrors.aliyun.com/ubuntu bionic-security InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim /etc/apt/sources.list
# 将原来的列表删除,添加如下内容:
# ustc sources
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu bionic main restricted universe multiverse
# deb-src <http://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# ali sources
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
添加 PPA 源的命令
sudo add-apt-repository ppa:user/ppa-name
添加好记得要更新一下
sudo apt-get update
删除 PPA 源的命令格式则为
sudo add-apt-repository -r ppa:user/ppa-name
然后进入 /etc/apt/sources.list.d 目录,将相应 ppa 源的保存文件删除。 最后同样更新一下:
sudo apt-get update
N: Skipping acquire of configured file 'universe/binary-i386/Packages' as repository 'http://miktex.org/download/ubuntu' bionic InRelease' doesn't support architecture 'i386'
sudo vim /etc/apt/sources.list.d/miktex.list
# 在deb后面加入 [arch=amd64]
sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock
error: http://mirrors.aliyun.com/ubuntu bionic-security InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 3B4FE6ACC0B21F32