温馨提示×

debian yum仓库在哪设置

小樊
52
2026-09-20 04:31:01
栏目: 智能运维

在 Debian 系统里没有 yum,也没有“yum 仓库”的概念。
yum 是 RHEL / CentOS / Fedora 等 RPM 系发行版使用的包管理器。

Debian 使用的是 APT(apt / apt-get),对应的“仓库”配置文件在:

1️⃣ 软件源主配置文件

/etc/apt/sources.list

2️⃣ 额外仓库目录(推荐)

/etc/apt/sources.list.d/

(通常一个软件一个 .list 文件)

3️⃣ 仓库密钥(GPG Key)

/etc/apt/trusted.gpg.d/
/etc/apt/keyrings/   # 新版本推荐方式

示例:Debian 软件源

deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://security.debian.org/debian-security bookworm-security main

修改后执行:

apt update

如果你是“想找 yum 仓库”

  • ✅ CentOS / RHEL:/etc/yum.repos.d/*.repo
  • ❌ Debian / Ubuntu:使用 APT,不是 yum

如果你是在 Debian 上装 yum(一般不推荐),那只是兼容工具,不是原生用法。

如果你告诉我:

  • 你用的是 Debian 几?
  • 想 配置哪个软件源?

我可以直接给你现成配置。

0 踩