linux问题汇总

这篇博客汇总了Linux系统中遇到的两大类问题:API及命令缺失和网络问题。在API和命令缺失部分,提到了sudo命令找不到的问题及其解决方法;在网络问题方面,包括Ubuntu版本升级后更换为清华源以解决软件安装问题,以及由于安全原因需临时将apt源的https改为http,并在更新后改回的处理步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

**

一:api以及各种命令缺失问题

**
问题1:
error :-bash: sudo: command not found

在这里插入图片描述


terminal中输入:

apt-get install sudo -y

查看安装是否完成

sudo -V

在这里插入图片描述

出现上面内容就说明问题解决

二:网络问题

问题1:

Using Anaconda API: https://api.anaconda.org
Fetching package metadata .......
CondaHTTPError: HTTP None None for url <https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2>
Elapsed: None

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/free/linux-64/repodata.json.bz2 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f6eacb410b8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))",),)

在这里插入图片描述


查看Ubuntu版本

cat /etc/issue

在这里插入图片描述
然后换成清华源:

参考

https://blog.youkuaiyun.com/Netfilter007/article/details/103895700?utm_medium=distribute.pc_relevant.none-task-blog-2defaultbaidujs_title~default-0.no_search_link&spm=1001.2101.3001.4242.1

问题2:

Err:11 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]

E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security Release' does not have a Release file.
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.

在这里插入图片描述
应该是由于缺乏 ca-certificates
直接 apt install ca-certificates 也会出现错误

因此要将源中的https换成http,由于http会增加网络风险,故apt update 之后要换回来,具体参考以下链接
参考:https://blog.youkuaiyun.com/qq_19729599/article/details/114682507

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值