2020-12-18

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值