跳到主要内容

Gentoo Portage 软件源镜像使用帮助

简介

Portage 是 Gentoo 的官方包管理器和分发系统。它提供高级依赖解析、从源代码或二进制包灵活构建和安装软件等功能。Portage 会从 Gentoo ebuild 仓库、额外的 ebuild 仓库或 binhost 中配置软件。本镜像仓库镜像了 Gentoo Portage Ebuild 仓库,采用 Git 方式同步。

使用方法

手动配置

请在 /etc/portage/repos.conf/gentoo.conf 中参照以下内容配置:

[DEFAULT]
main-repo = gentoo

[gentoo]
location = /var/db/repos/gentoo
sync-type = git
sync-uri = https://mirrors.hust.edu.cn/git/gentoo-portage.git
auto-sync = yes

然后,执行下列命令:

第一次使用 git 同步时请执行:

# 删除本地 main tree 目录
rm -rf /var/db/repos/gentoo

# 重新同步
emerge --sync

否则请执行:

# 进入 main tree 目录
cd /var/db/repos/gentoo

# 设置 remote url 为华中科大镜像源
git remote set-url origin https://mirrors.hust.edu.cn/git/gentoo-portage.git

# 重新同步
emerge --sync

引用

  1. 使用帮助 - USTC Mirror
选择使用的域名
mirrors.hust.edu.cn
该域名线路为 双栈线路
是否启用HTTPS