richboy3
2021-02-08 11:30
采纳率: 85.7%
浏览 647

ubuntu18.04 apt-get update失败(已换成国内阿里源)

出现以下错误

root@ubuntu:~# apt-get update
Err:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
  Could not connect to mirrors.aliyun.com:80 (115.238.192.244), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.243), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.242), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.248), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.238), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.239), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.211), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.206), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.212), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.208), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.241), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.241), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.240), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.244), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.248), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.240), connection timed out
Err:2 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
  Unable to connect to mirrors.aliyun.com:http:
Err:3 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
  Unable to connect to mirrors.aliyun.com:http:
Err:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
  Unable to connect to mirrors.aliyun.com:http:
Reading package lists... Done                          
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic/InRelease  Could not connect to mirrors.aliyun.com:80 (115.238.192.244), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.243), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.242), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.248), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.238), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.239), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.211), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.206), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.212), connection timed out Could not connect to mirrors.aliyun.com:80 (122.228.1.208), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.241), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.241), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.240), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.244), connection timed out Could not connect to mirrors.aliyun.com:80 (115.231.152.248), connection timed out Could not connect to mirrors.aliyun.com:80 (115.238.192.240), connection timed out
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-updates/InRelease  Unable to connect to mirrors.aliyun.com:http:
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-backports/InRelease  Unable to connect to mirrors.aliyun.com:http:
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-security/InRelease  Unable to connect to mirrors.aliyun.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.

昨天在安装数据库的时候更新源还是正常的 今天就变这种问题了 找了各种问题也没有用 求大佬解惑!! 

ps.目前在xshell7上操作 

  • 好问题 提建议
  • 收藏

2条回答 默认 最新

  • richboy3 2021-02-24 11:05
    已采纳

    还是网络的问题 重新安装后 自动获取ip地址 不设定固定ip

    已采纳该答案
    评论
    解决 无用
    打赏 举报
  • richboy3 2021-02-08 11:33

    这是sources.list的配置

    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://mirrors.aliyun.com/ubuntu bionic main restricted
    # deb-src http://mirrors.aliyun.com/ubuntu bionic main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://mirrors.aliyun.com/ubuntu bionic-updates main restricted
    # deb-src http://mirrors.aliyun.com/ubuntu bionic-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://mirrors.aliyun.com/ubuntu bionic universe
    # deb-src http://mirrors.aliyun.com/ubuntu bionic universe
    deb http://mirrors.aliyun.com/ubuntu bionic-updates universe
    # deb-src http://mirrors.aliyun.com/ubuntu bionic-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://mirrors.aliyun.com/ubuntu bionic multiverse
    # deb-src http://mirrors.aliyun.com/ubuntu bionic multiverse
    deb http://mirrors.aliyun.com/ubuntu bionic-updates multiverse
    # deb-src http://mirrors.aliyun.com/ubuntu bionic-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://mirrors.aliyun.com/ubuntu bionic-backports main restricted universe multiverse
    # deb-src http://mirrors.aliyun.com/ubuntu bionic-backports main restricted universe multiverse
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题