zoukankan      html  css  js  c++  java
  • Ubuntu 获取升级信息失败。可能网络有问题

    升级Ubuntu系统时遇到的这个问题, 原因是默认的源不是国内的,而且还可能导致下载慢等问题。
    1.备份源

    cd /etc/apt/
    sudo cp sources.list sources.list.bat
    

    2.更换源

    sudo vim sources.list
    

    清除sources.list内的所有内容.更换为

    
    #阿里云 Ubuntu 18.04
    
        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
    

    按“ [Shift] +ZZ ”保存并退出
    3.刷新

    apt-get update
    apt-get upgrade
    

    OK 啦 !

    温馨提示:
    更新系统后要换新的源->hugboy源库


    ________________________________________________________

    Every good deed you do will someday come back to you.

    Love you,love word !
  • 相关阅读:
    C语言寒假大作战01
    C语言I作业12—学期总结
    C语言I博客作业11
    C语言I博客作业10
    C语言I博客作业09
    C语言I博客作业08
    centos安装swoole
    Apache优化:修改最大并发连接数
    centos中安装、升级git
    memcached/memcache安装
  • 原文地址:https://www.cnblogs.com/hugboy/p/12760350.html
Copyright © 2011-2022 走看看