• 【linux】虚拟机上的一些问题(ubuntu)


    1. apt 获取资源过慢问题

    更换apt下载源, apt下载源在 /etc/apt/sources.list中, 先把原来的数据copy一个副本

    cd /etc/apt
    sudo cp source.list source.list.bak

    然后查看系统的codename, 比如我的是 bionic

    yeyeck@ubuntu:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID:    Ubuntu
    Description:    Ubuntu 18.04.1 LTS
    Release:    18.04
    Codename:    bionic
    yeyeck@ubuntu:~$ 

    再把/etc/apt/sources.list里的数据全部删掉, 把以下数据中标记的bionic 全部替换为你系统的codename, 并保存

    deb http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe

    最后执行以下命令

    sudo apt-get update

    2. pip3 下载慢的问题

    mkdir ~/.pip
    sudo vim ~/.pip/pip.conf

    然后在文件中输入以下内容,保存即可

    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host = mirrors.aliyun.com

  • 相关阅读:
    1.打开windows中功能的快捷方式
    16-SQLServer强制走索引
    15-资源等待类型sys.dm_os_wait_stats
    14-SQLServer索引碎片
    13-修复数据库,表,索引
    12-SSMS图形化工具中不允许保存修改的解决办法
    11-常用SQL总结
    10-SQLServer中统计信息的使用
    Java连接mysql数据库
    递归方式的对变量中的特殊字符进行转义/去除转义
  • 原文地址:https://www.cnblogs.com/yeyeck/p/9614716.html
Copyright © 2020-2023  润新知