ubuntu 22.04 设置 apt 代理 配置 清华源 add-apt-repository 代理

news/2024/7/9 20:52:13 标签: ubuntu, postgresql, 数据库, 1024程序员节

另一种临时代理

export http_proxy=http://<proxy>:<port>
export https_proxy=http://<proxy>:<port>
sudo -E add-apt-repository ppa:linaro-maintainers/toolchain

https://askubuntu.com/questions/53146/how-do-i-get-add-apt-repository-to-work-through-a-proxy

如果没有代理配置文件就创建一个
sudo touch /etc/apt/apt.conf.d/proxy.conf

编辑配置
sudo vim /etc/apt/apt.conf.d/proxy.conf

Acquire::http::Proxy "http://[username]:[password]@ [proxy-web-or-IP-address]:[port-number]";
Acquire::https::Proxy "http://[username]:[password]@ [proxy-web-or-IP-address]:[port-number]";

在这里插入图片描述

输入 sudo apt update 测试
在这里插入图片描述
参考
https://linuxiac.com/how-to-use-apt-with-proxy/
https://phoenixnap.com/kb/ubuntu-proxy-settings

设置清华源

Ubuntu 的软件源配置文件是 /etc/apt/sources.list。将系统自带的该文件做个备份,将该文件替换为下面内容,即可使用选择的软件源镜像。

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

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

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

在这里插入图片描述
参考
https://zhuanlan.zhihu.com/p/251009600
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/


http://www.niftyadmin.cn/n/5118712.html

相关文章

C语言之判断与循环语句知识点总结

目录 if选择结构 单选择结构 双选择结构 多选择结构 代码示例 switch case语句 break语句的用法 while循环语句 do-while循环语句 for循环语句 循环的嵌套 continue语句 if选择结构 当我们需要根据条件的成立与否来执行不同的代码块时&#xff0c;可以使用C语言中…

偕行十年,阿里云助力众安保险用科技温暖每一张保单

云布道师 前言&#xff1a;应云而生的众安保险&#xff0c;其 IT 架构都搭建在阿里云上&#xff0c;云服务器 ECS 关键应用上的数据需要保护&#xff0c;需要简单易用、稳定性高的方案&#xff0c;助力保险业务的快速开发和上线。在经过全面充分地沟通评估后&#xff0c;众安保…

以太坊搭建私有链(非常详细!!!)

我的系统&#xff1a;CentOS7 64位 我喜欢宝塔的直观&#xff1a; /www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip yum install -y wget && wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sh install.sh ed84…

Python 深度学习入门之CNN

CNN 前言一、CNN简介1、简介2、结构 二、CNN简介1、输出层2、卷积层3、池化层4、全连接层5、输出层 前言 1024快乐&#xff01;1024快乐&#xff01;今天开新坑&#xff0c;学点深度学习相关的&#xff0c;说下比较火的CNN。 一、CNN简介 1、简介 CNN的全称是Convolutiona…

分享个包含各省、市、区的编码数据的在线静态资源脚本

在翻《SpringBootVue3》——十三尼克陈作者的大型前后端分离项目实战里面&#xff0c;在看到地址管理的部分时&#xff0c;发现了该作者记录有一个静态的地址资源脚本 这里做个记录&#xff0c;打点 一、引入js <script src"https://s.yezgea02.com/1641120061385/td…

ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9‘ not found的解决方法

导致该错误的原因&#xff1a;gcc动态库版本太老了 解决方法&#xff1a; 1、编辑~/.bash_profile vim ~/.bash_profile 2、将anaconda3/lib的路径加入库文件的路径 LD_LIBRARY_PATH/your_path/anaconda3/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH 3、重载~/.bash_pr…

ARM 汇编指令 orreq 的使用

orreq 阅读代码时&#xff0c;发现有个【组合指令】 orreq&#xff0c; orr 一般是 OR&#xff0c;也就是或操作&#xff0c;后面加个 eq 表示什么呢&#xff1f; 比如下面的代码&#xff1a;前面一个操作&#xff0c; tst&#xff0c;好像没做实际的操作&#xff0c;可能影响…

[Ubuntu 18.04] 搭建文件夹共享之Samba服务器

Samba是一个开源项目,允许Windows用户在Linux和Unix系统上进行文件共享。 Samba服务器是一个可以让Linux或Unix系统在网络上充当Windows NT/2000/XP/2003等网络操作系统的共享资源的软件。它允许用户通过SMB/CIFS协议在Linux或Unix系统与Windows共享资源。 Samba服务器的主要…