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 !
  • 相关阅读:
    手把手教你学Git
    服务器上Mysql的安装与配置
    python 5
    python 4
    python 3
    python 2
    区分命令行模式和Python交互模式
    CUDA编程模型之内存管理
    多目标优化算法-NSGA2
    C# ListView 如何添加列标头
  • 原文地址:https://www.cnblogs.com/hugboy/p/12760350.html
Copyright © 2011-2022 走看看