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
    

    等一会即可

  • 相关阅读:
    mac 使用tree命令
    为什么redis支持lua脚本功能
    redis协议
    Linux的SOCKET编程详解
    大型网站架构之分布式消息队列
    自定义String
    逆转单链表
    单例模式 C++
    构造函数不能为虚函数
    Windows消息机制
  • 原文地址:https://www.cnblogs.com/velscode/p/13388264.html
Copyright © 2011-2022 走看看