Ubuntu运行命令sudo apt-get update时报错怎么解决呀
更新报错:
root@ubuntu:/# sudo apt-get update
lgn:1 httlp://ppa.launchpad.net/plushuang-tw/uget-stable/ubuntu bionic InRelease
Ign:2 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
Ign:3 http://ppa.launchpad.net/t-tujikawa/ppa/ubuntu bionic InRelease
Ign:4 http://cn.archive.ubuntu.com/ubuntu xenial-security InRelease
Err:5 http://ppa.launchpad.net/plushuang-tw/uget-stable/ubuntu bionic Release
SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.95.85 80]
Ign:6 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
Err:7 http://ppa.launchpad.net/t-tujikawa/ppa/ubuntu bionic Release
SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.95.85 80]
Ign:8 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease
Ign:9 http://cn.archive.ubuntu.com/ubuntu xenial-proposed InRelease
Err:10 http://cn.archive.ubuntu.com/ubuntu xenial Release
SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.39 80]
Err:11 http://cn.archive.ubuntu.com/ubuntu xenial-security Release
SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.39 80]
Err:12 http://cn.archive.ubuntu.com/ubuntu xenial-updates Release
SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.39 80]
Err:13 http://cn.archive.ubuntu.com/ubuntu xenial-backports Release
SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.39 80]
Err:14 http://cn.archive.ubuntu.com/ubuntu xenial-proposed Release
SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.39 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/plushuang-tw/uget-stable/ubuntu bionic Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/t-tujikawa/ppa/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu xenial-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://cn.archive.ubuntu.com/ubuntu xenial-proposed Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
解决方案:
解决方案
更换https软件软件源,比如清华的。
打开链接:https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
选择合适的ubuntu版本,更新仓库配置文件/etc/apt/sources.list
。
mv /etc/apt/sources.list /etc/apt/sources.list_bak
vim /etc/apt/sources.list
下面这个是16.04的配置文件:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse