• ubuntu 12.04 apt换源


    2022-03 实测可用

    前言
    本文主要介绍如何为已经不再支持的Ubuntu 12.04LTS 更换源,网上查到的源(很多是13-14年的帖子)都无法直接使用了,例如下面这个

    deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse
    deb http://archive.ubuntu.com/ubuntu precise-security universe main multiverse restricted
    deb http://archive.ubuntu.com/ubuntu precise-updates universe main multiverse restricted
    deb http://archive.ubuntu.com/ubuntu precise-proposed universe main multiverse restricted
    

    最后google到一个github帖子解决了这个问题,由于12.04不受支持了,12.04相关的这些包的资源被移到了old-releases.ubuntu.com域名下,而不是security.ubuntu.com和 archive.ubuntu.com了,因此需要修改源。使用如下命令修改源:

    sudo sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

    修改后的源:

    deb http://old-releases.ubuntu.com/ubuntu precise main universe restricted multiverse
    deb http://old-releases.ubuntu.com/ubuntu precise-security universe main multiverse restricted
    deb http://old-releases.ubuntu.com/ubuntu precise-updates universe main multiverse restricted
    deb http://old-releases.ubuntu.com/ubuntu precise-proposed universe main multiverse restricted

    参考:

    https://blog.csdn.net/gibbs_/article/details/119212041

    https://gist.github.com/dergachev/f5da514802fcbbb441a1

     
  • 相关阅读:
    c++获取线程id
    一个基于c++的log库
    防止socket程序重启等待2MSL时间
    c++头文件循环引用
    Myeclipse 8.5 优化设置
    来道题 求解释
    MyEclipse常用设置笔记
    Ubuntu 学习笔记
    Linux 下常用命令
    Oracle 学习笔记 常用查询命令篇
  • 原文地址:https://www.cnblogs.com/Moooo/p/16044830.html
Copyright © 2020-2023  润新知