我无法在 RHEL8.1 上安装 tor。我创建一个存储库文件:/etc/yum.repos.d/tor.repo
包含
[tor]
name=Tor experimental
repo enabled=1 baseurl=http://deb.torproject.org/torproject.org/rpm/el/6/$basearch/
gpgcheck=1
gpgkey=http://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc
[tor-source]
name=Tor experimental source repo
enabled=1
autorefresh=0
baseurl=http://deb.torproject.org/torproject.org/rpm/el/6/SRPMS
gpgcheck=1 gpgkey=http://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc'
安装tor时出现以下错误:
# yum -y install tor
Updating Subscription Management repositories.
Tor Project Repo 962 B/s | 264 B 00:00
Failed to download metadata for repo 'Tor'
Error: Failed to download metadata for repo 'Tor'
答案1
您添加的 RHEL 存储库不正确。 RHEL 基于 RPM 软件包,但您要添加包含 Debian/Ubuntu 的 DEB 软件包的存储库。
在文件中添加存储库:/etc/yum.repos.d/tor.repo
[tor]
name=Tor for Enterprise Linux $releasever - $basearch
baseurl=https://rpm.torproject.org/centos/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://rpm.torproject.org/centos/public_gpg.key
cost=100
启用 EPEL 存储库:
dnf install epel-release -y
导入存储库的 GPG 密钥: https://rpm.torproject.org/fedora/public_gpg.key
wget -O- -q https://rpm.torproject.org/fedora/public_gpg.key
rpm --import public_gpg.key
安装托尔:
dnf install tor -y