zoukankan      html  css  js  c++  java
  • 【树莓派】树莓派常用的一些源

    树莓派更新或者下载一些软件资源的话,需要从国外下载,比较慢。

    阿里云的镜像源:

    http://mirrors.aliyun.com/raspbian/raspbian/

    这是一些国内的源,可以参考使用:

    #替换国内源
    
    #中山大学
    deb http://mirror.sysu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    
    #中国科学技术大学
    deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    
    #清华大学
    deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    
    #华中科技大学
    #deb http://mirrors.hustunique.com/raspbian/raspbian/ wheezy main contrib non-free rpi
    #Arch Linux ARM http://mirrors.hustunique.com/archlinuxarm/ wheezy main contrib non-free rpi
    
    #大连东软信息学院源(北方用户)
    #deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    #重庆大学源(中西部用户)
    #deb http://mirrors.cqu.edu.cn/Raspbian/raspbian/ wheezy main contrib non-free rpi
    
    #新加坡国立大学
    #deb http://mirror.nus.edu.sg/raspbian/raspbian wheezy main contrib non-free rpi
    
    #牛津大学
    #deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ wheezy main contrib non-free rpi
    
    #韩国KAIST大学
    #deb http://ftp.kaist.ac.kr/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    
    #官网的源
    #deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
    
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ wheezy main contrib non-free rpi
     
    修改源一般需要这么操作:
    1 修改sources.list
        【备份】
    •     在修改之前先把源列表备份,然后再修改sources.list
    •     cd /etc/apt
    •     cp sources.list sources.list_back
        【修改】
    •    sudo vim sources.list
    •    例如使用大连东软信息学院软件源镜像,修改之后的内容如下:
    •    deb http://mirrors.neusoft.edu.cn/raspbian/raspbian wheezy main contrib non-free rpi 
    •    记得格式一定要正确!!!!!!
     
    2 更新软件源和软件
    # 更新软件源
    sudo apt-get update
    # 更新软件
    sudo apt-get upgrade

    其他,可以参考阿里云的镜像:

    下面摘自:https://yq.aliyun.com/ziliao/54296(以下内容此处仅作学习使用,如果不妥,联系则删除)

    阿里开源镜像站提供了raspbian的软件包镜像,国内的用户可以选择改用阿里镜像站作为更新源。最新的jessie版可以参考本文。

    具体做法

    修改之前,最好先备份原始的配置文件。例如,使用如下命令将两个源配置文件拷贝到HOME目录。

    cp /etc/apt/sources.list ~
    cp /etc/apt/sources.list.d/raspi.list ~

    或者直接在原来配置文件的基础上修改,但将原有的配置全部注释掉(使用#注释)。

    修改 sources.list

    更新后的/etc/apt/sources.list:

    #deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

    # use ustc mirror:
    deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi

    实际修改是,将 mirrordirector.raspbian.org 替换为 mirrors.aliyun.com/raspbian/ 。

    修改 raspi.list

    更新后的/etc/apt/raspi.list:

    #deb http://archive.raspberrypi.org/debian/ jessie main ui
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://archive.raspberrypi.org/debian/ jessie main ui

    # use ustc mirror:
    deb http://mirrors.aliyun.com/debian/ jessie main ui

    实际修改是,将 archive.raspberrypi.org 替换为 mirrors.aliyun.com 。

    update

    更换了软件源之后,需要update

    sudo apt-get update

    更多镜像源
    
    #大连东软信息学院(北方用户)
    #deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    #deb-src http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    #中国科学技术大学
    #deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    #deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    #清华大学
    #deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    #deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    #重庆大学(中西部用户)
    #deb http://mirrors.cqu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    #deb-src http://mirrors.cqu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
    
    #前面几个都是教育网的
    
    #搜狐
    #deb http://mirrors.sohu.com/raspbian/raspbian/ wheezy main contrib non-free rpi
    #deb-src http://mirrors.sohu.com/raspbian/raspbian/ wheezy main contrib non-free rpi

    樹莓派提供的源:http://shumeipai.nxez.com/2015/10/07/raspbian-gnu-linux-upgrade-from-wheezy-to-raspbian-jessie-8.html

    deb http://mirrordirector.raspbian.org/raspbian jessie main firmware contrib non-free
  • 相关阅读:
    时区处理
    C#视频取帧图
    【C#】C#获取文件夹下的所有文件
    利用web of science做论文综述
    C# HTML解析工具HtmlAgilityPack使用实例(一)
    C#+HtmlAgilityPack+XPath带你采集数据(以采集天气数据为例子)
    win10文件夹或文件已在另一程序中打开
    指定网卡IP进行ping操作
    C# 使用WebClient时,在多网卡IP时,指定IP发送Web请求
    C# 消息队列
  • 原文地址:https://www.cnblogs.com/haochuang/p/7116361.html
Copyright © 2011-2022 走看看