论文中网站数据则呢做文献参考,广东省广州市白云区白云湖街道,做外贸卖小商品是哪个网站,外链交易平台一、sudo apt-get update命令
在Debian系中#xff0c;Ubuntu是很火的一款开源系统产品。使用sudo apt-get update从我们的更新源中获取并更新系统中软件包的列表信息#xff0c;sudo apt-get update作用如下#xff1a; 更新软件包列表: 将本地软件包列表与远程仓库中的最…一、sudo apt-get update命令
在Debian系中Ubuntu是很火的一款开源系统产品。使用sudo apt-get update从我们的更新源中获取并更新系统中软件包的列表信息sudo apt-get update作用如下 更新软件包列表: 将本地软件包列表与远程仓库中的最新列表同步这样系统就可以了解到所有可用的软件包及其版本信息。 获取最新版本信息: 更新操作会检查每个软件包的最新版本号和依赖关系确保系统中的软件包信息是最新的。 修复软件包索引问题: 有时候软件包索引可能过时或损坏运行 sudo apt-get update 可以修复这些问题使得后续的软件包安装和升级操作能够正常进行。 二、Ubuntu存放源的文件 在Ubuntu中我们使用各种各样的工具和依赖包都需要从更新源获取并下载下来然后安装之后才能使用。传统的更新源文件指定在/ect/apt/目录下传统的更新源文件名称sources.list 更新源的两种格式 1、传统格式/etc/apt/sources.list 2、DEB822 格式/etc/apt/sources.list.d/ubuntu.sources 今天我遇到了这么一个问题我想安装net-tools工具使用传统的ifconfig命令查看ip地址但是工具安装不了问题如下 sudo apt-get install net-tools //安装net-tools因为更新源被拒绝了需要换个源 Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: net-tools 0 upgraded, 1 newly installed, 0 to remove and 87 not upgraded. Need to get 204 kB of archives. After this operation, 819 kB of additional disk space will be used. Ign:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60git20181103.0eebece-1ubuntu5 Ign:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60git20181103.0eebece-1ubuntu5 Ign:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60git20181103.0eebece-1ubuntu5 Err:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60git20181103.0eebece-1ubuntu5 Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) Could not connect to cn.archive.ubuntu.com:80 (45.125.0.6). - connect (111: Connection refused) E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/n/net-tools/net-tools_1.60%2bgit20181103.0eebece-1ubuntu5_amd64.deb Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) Could not connect to cn.archive.ubuntu.com:80 (45.125.0.6). - connect (111: Connection refused) E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 我想安装原来的Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror这个被拒绝了很麻烦获取不到来自更新源所在仓库的工具和依赖包。没办法要么自己搭建仓库存储各种各样的工具和依赖包。。。要么更换源。我选换源 sudo apt-get update //被拒绝 Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:2 http://cn.archive.ubuntu.com/ubuntu jammy InRelease Ign:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:2 http://cn.archive.ubuntu.com/ubuntu jammy InRelease Ign:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:2 http://cn.archive.ubuntu.com/ubuntu jammy InRelease Ign:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease Err:2 http://cn.archive.ubuntu.com/ubuntu jammy InRelease Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) Could not connect to cn.archive.ubuntu.com:80 (45.125.0.6). - connect (111: Connection refused) Err:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) Err:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) Reading package lists... Done W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/jammy/InRelease Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) Could not connect to cn.archive.ubuntu.com:80 (45.125.0.6). - connect (111: Connection refused) W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease Cannot initiate the connection to cn.archive.ubuntu.com:80 (2403:2c80:5::6). - connect (101: Network is unreachable) W: Some index files failed to download. They have been ignored, or old ones used instead. 三、更新源
从网上我搜集了国内的三所名牌大学和四个知名企业的Ubuntu源地址家大业大不容易倒闭稳的一批 ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror 帮助-北京大学开源镜像站 (pku.edu.cn) 中国科学技术大学Ubuntu - USTC Mirror Help ubuntu镜像_ubuntu下载地址_ubuntu安装教程-阿里巴巴开源镜像站 (aliyun.com) 华为开源镜像站_软件开发服务_华为云 (huaweicloud.com) 腾讯云开源镜像站上线啦! (tencent.com)//腾讯老大哥源更新文档不及时不推荐 Ubuntu官方源Ubuntu | 全球领先的用于个人电脑、平板及手机的操作系统//一般不推荐没办法国内外互联网走不通网卡的一批 这里我直接使用传统格式重新更换了新的清华大学的源ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror,直接把源地址中的如下红框截图的部分全部copy到/etc/apt/sources.list文件中把原来的内容全部注释或删除即可。细节一定要有root权限或者sudo获取root权限 四、更新索引
sudo apt-get update,成功更新源 最后我再试试sudo apt-get install net-tools成功安装 ifconfig命令也成功显示了IP地址Over!