zoukankan      html  css  js  c++  java
  • Linux系统分支之Ubuntu

    1)切换镜像源

    本身的镜像都是国外的,下载依赖包太慢, 需要替换成国内镜像地址

    国内镜像源推荐
    阿里 OPSX 源: https://opsx.alibaba.com/mirror
    网易 163 源: http://mirrors.163.com/
    中科大 USTC 源: https://mirrors.ustc.edu.cn/
    清华 TUNA 源: https://mirrors.tuna.tsinghua.edu.cn/
    ubuntu 中国官方源(搜狐): http://mirrors.sohu.com/help/ubuntu.html

    1. 需要修改/etc/apt/sources.list文件内容来修改apt源
    
    首先备份文件
    cd /etc/apt/
    cp sources.list sources.list.bak
    
    2.修改sources.list文件内容
    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
    
    
    3.更新apt本地索引
    apt-get update

    常见问题:

     1.使用apt-get update 更新的时候发生错误  

    Ubuntu 20.04 GPG error: The following signatures couldn't be verified

      原因:这是因为尝试包含第三方包失败,需要进行导入操作

    解决:

    1.W: GPG error: http://pkg.jenkins-ci.org/debian binary/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FCEF32E745F2C3D5
    E: The repository 'http://pkg.jenkins-ci.org/debian binary/ Release' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    
    找到PUBKEY  : FCEF32E745F2C3D5
    
    2.导入密钥
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys  FCEF32E745F2C3D5
    
    3.apt-key  list   查看当前导入的key
  • 相关阅读:
    java:产生小数位数为2的随机概率,使得和为1
    大数据网络分析规划
    java碎笔
    mysql修改记录
    mysql导入导出数据
    Centos中hive/hbase/hadoop/mysql实际操作及问题总结
    linux后台运行程序
    Centos搭建mysql/Hadoop/Hive/Hbase/Sqoop/Pig
    ARM-LINUX自动采集温湿度传感器数据
    java中枚举类型的使用
  • 原文地址:https://www.cnblogs.com/xingxia/p/linux_ubuntu.html
Copyright © 2011-2022 走看看