zoukankan      html  css  js  c++  java
  • 修改ubuntu默认源

    修改文件

    桌面版Ubuntu默认非root账户

    可以先在 home/user/下新建一个文件source.list-new

    将其写为

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
     
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
     
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
     
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src 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-backports main restricted universe multiverse
    

    然后在命令行切换到root用户执行

    cp /home/user/source.list-new /etc/apt/source.list
    

    更新源

    apt-get update
    

    这一步报错

    这是因为系统中有进程在占用apt-get

    ps -ef | grep "apt-get"
    

    可以看到

    干掉他,然后继续执行

    killall apt-get
    
    apt-get update
    apt-get upgrade
    

    等一会即可

  • 相关阅读:
    [Violet]蒲公英
    CF535-Div3
    逛公园
    exgcd
    线段树套线段树
    Luogu P2730 魔板 Magic Squares
    fhqtreap
    AtCoder Beginner Contest 115
    关于这个博客
    智障错误盘点
  • 原文地址:https://www.cnblogs.com/velscode/p/13388264.html
Copyright © 2011-2022 走看看