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
  • 相关阅读:
    uni.navigateTo 无法跳转到页面
    微信小程序 navigateTo 只能使用几次 无效后 怎么处理的?
    Vue中computed和watch的区别
    vue 动态添加样式的方式
    浏览器数据库IndexedDB介绍
    Gitlab CI/CD 之 Gitlab Runner Docker Executor 缓存问题
    Gitlab CI/CD 之 Gitlab-Runner
    .neter 的 java 学习之路
    Gitlab 迁移后 runner 访问报错的问题
    .neter 的 java 学习之路
  • 原文地址:https://www.cnblogs.com/xingxia/p/linux_ubuntu.html
Copyright © 2011-2022 走看看