下载软件时软件源的问题,/etc/apt/sources.list是什么

我遇见的问题:在Anaconda 建立的虚拟Python环境下,装spyder 装到100% ,后面失败装不下去了。
提示信息如下:
:E: 无法下载
Err:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 fonts-elusive-icons all 2.0.0-4
Connection failed [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/f/fonts-elusive-icons/fonts-elusive-icons_2.0.0-4_all.deb Connection failed [IP: 91.189.91.39 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

原因:
问题根源:软件源问题,某些文件URL请求失败,导致出现某些文件无法下载的问题。
大白话就是 http://us.archive.ubuntu.com/ubuntu/pool/universe/f/fonts-elusive-icons/fonts-elusive-icons_2.0.0-4_all.deb
链接找不到,或者访问人太多,网络不好等。(可以尝试逐层找,比如先找http://us.archive.ubuntu.com)

解决办法:
重新找一个下载源:
①sudo gedit /etc/apt/sources.list
② 备份这个文件的内容,
或者增加如下 “#上面这些是我在网上找的下载源”
我是删除了原本自带的,加入了网上找到的下载源操作的,操作完毕又恢复了原始自带的状态。
③增加的时候注意:

   执行命令
   (MyFirstEnv) lxk@ubuntu:~$ lsb_release -a

     然后会显示:
	No LSB modules are available.
	Distributor ID:	Ubuntu
	Description:	Ubuntu 20.04.3 LTS
	Release:	20.04
	Codename:	focal

然后会得到我们自己的 Ubuntu 的版本信息 ,
最后一栏 codename 后面的就是我们自己的 Ubuntu 的代号。
比如我安装的是 Ubuntu 20.4,查出来的代号就是 focal.

要把需要 粘贴来的Ubuntu 的代号内容改为你自己的Ubuntu 的代号。
比如:
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
改成
deb http://mirrors.aliyun.com/ubuntu/ 你的代号 main restricted universe multiverse

④在终端上执行以下命令更新软件列表

sudo apt-get update
#上面这些是我原本 Ubuntu系统自带的下载源
#deb cdrom:[Ubuntu 20.04.3 LTS _Focal Fossa_ - Release amd64 (20210819)]/ focal main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

#上面这些是我在网上找的下载源
# 阿里云源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
##測試版源
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# 源碼
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse


# 清华大学源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
##測試版源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# 源碼
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
vi /etc/apt/sources.list

/etc/apt/sources.list 
是包管理工具 apt 所用的记录软件包仓库位置的配置文件,同样的还有位于 
/etc/apt/sources.list.d/*.list 的各文件。

修改 /etc/apt/sources.list 文件,也即修改镜像源,
能够加快在 Ubuntu 中下载和更新相关软件数据;
否则默认情况下使用的是外网,下载起来比较慢!!!


find 命令查找文件

//-- 在根目录下 全局查找 qtcreator
sudo find / -iname qtcreator

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值