Ubuntu24.04常见问题

换源

Ubuntu24.04不再使用sources.list作为源的路径,而是换成同文件夹所属子文件夹sources.list.d中的ubuntu.souces作为源的路径,输入 sudo nano /etc/apt/sources.list.d/ubuntu.sources进入该文件编辑,清除所有数据(记得先做好备份)然后把下方的ustc源粘贴进去:

Types: deb

URIs: https://mirrors.ustc.edu.cn/ubuntu/

Suites: noble noble-updates noble-backports noble-security

Components: main universe restricted multiverse

Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

更多:https://blog.csdn.net/Zzp750/article/details/145771731

使用apt-fast 替换apt

安装编译工具和依赖:

sudo apt update

sudo apt install build-essential git

克隆 apt-fast 的 Git 仓库:

git clone https://github.com/ilikenwf/apt-fast.git

cd apt-fast

编译并安装:

sudo make install

使用 apt-fast

安装完成后,你可以通过以下方式使用 apt-fast 替代 apt 或 apt-get:

sudo apt-fast update

sudo apt-fast install package_name

更换ppa源

修改ppa:

点添加,输入 deb https://launchpad.proxy.ustclug.org/graphics-drivers/ppa/ubuntu/ noble main

换完发现没有公钥,keyserver.ubuntu.com 是一个常用的 GPG 密钥服务器,国内可能访问不上,使用pgpkeys.mit.edu替代:

gpg --keyserver pgpkeys.mit.edu --recv-key FCAE110B1118213C

gpg -a --export FCAE110B1118213C | sudo apt-key add -

或者专用密钥环文件(推荐):

sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/graphics-drivers.gpg --keyserver pgpkeys.mit.edu --recv-keys FCAE110B1118213C

若报密钥存储在过时的 trusted.gpg 密钥环中(/etc/apt/trusted.gpg)

把/etc/apt/trusted.gpg复制到 trusted.gpd.d 目录中(快速而不优雅的方法)

sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d

相关推荐
Rudon滨海渔村2 个月前
Linux通用一键换源脚本.sh - ubuntu、centos全自动更换国内源 - LinuxMirrors神器
linux·运维·ubuntu·centos·换源
潇然四叶草3 个月前
ubuntu24.04安装VMware Tools
linux·ubuntu·vmware·文件共享·ubuntu24.04
记得M遗忘5 个月前
xrdp连接闪退情况之一
ubuntu·xrdp·ubuntu24.04
小袁搬码7 个月前
Ubuntu24.04LTS设置root用户可远程登录
linux·ubuntu24.04
勤奋的凯尔森同学7 个月前
Ubuntu24.04安装和配置Redis7.4
redis·ubuntu24.04·redis7.4
勤奋的凯尔森同学7 个月前
ubuntu22.04上手指南(更新阿里源、安装ssh、安装chrome、设置固定IP、安装搜狗输入法)
chrome·tcp/ip·ssh·ubuntu22.04·搜狗输入法·ubuntu24.04
勤奋的凯尔森同学7 个月前
ubuntu-desktop-24.04上手指南(更新阿里源、安装ssh、安装chrome、设置固定IP、安装搜狗输入法)
ubuntu·搜狗输入法·静态ip地址·ubuntu24.04·固定ip地址
vortex57 个月前
各种环境换源教程
教程·镜像源·换源
Android系统攻城狮1 年前
Ubuntu24.04之安装KVM(二百五十五)
ubuntu24.04·kvm安装