无法禁用 yum 存储库“RhnRepo”对象没有属性“cfg”

无法禁用 yum 存储库“RhnRepo”对象没有属性“cfg”

我无法禁用以下 repo,而且我似乎无法在任何地方找到配置文件,因此我想它是被手动删除的:

yum-config-manager --disable rhel7-x-suse-manager-tools-x86_64
Loaded plugins: langpacks, product-id, rhnplugin, subscription-manager
This system is receiving updates from RHN Classic or Red Hat Satellite.
===================================== repo: rhel7-x-suse-manager-tools-x86_64 ======================================
[rhel7-x-suse-manager-tools-x86_64]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7Server
baseurl = https://azsu-c-app-121.azure.uk.centricaplc.com/XMLRPC/GET-REQ/rhel7-x-suse-manager-tools-x86_64
cache = 0
cachedir = /var/cache/yum/x86_64/7Server/rhel7-x-suse-manager-tools-x86_64
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage = 75
enabled = 0
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7Server/rhel7-x-suse-manager-tools-x86_64/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7Server/rhel7-x-suse-manager-tools-x86_64/gpgdir
gpgkey =
hdrdir = /var/cache/yum/x86_64/7Server/rhel7-x-suse-manager-tools-x86_64/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
label = rhel7-x-suse-manager-tools-x86_64
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist =
mirrorlist_expire = 86400
name = RHEL7-x SUSE-Manager-Tools x86_64
password =
persistdir = /var/lib/yum/repos/x86_64/7Server/rhel7-x-suse-manager-tools-x86_64
pkgdir = /var/cache/yum/x86_64/7Server/rhel7-x-suse-manager-tools-x86_64/packages
proxy =
proxy_dict = {'ftp': '', 'http': '', 'https': ''}
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
rhn_needed_headers = X-RHN-Server-Id,
   X-RHN-Auth-User-Id,
   X-RHN-Auth,
   X-RHN-Auth-Server-Time,
   X-RHN-Auth-Expire-Offset
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert = /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 120.0
ui_id = rhel7-x-suse-manager-tools-x86_64
ui_repoid_vars = releasever,
   basearch
up2date_cfg = <up2date_client.config.Config instance at 0x7f3c363d7bd8>
username =
Traceback (most recent call last):
  File "/bin/yum-config-manager", line 205, in <module>
    repo.cfg.options, repo.iteritems, repo.optionobj,    AttributeError: 'RhnRepo' object has no attribute 'cfg'

答案1

/etc/yum.repos.d通过在包含 repo 配置的目录中创建一个文件(除了包含您订阅的所有 RHEL repo 的配置)将第三方存储库添加到系统中redhat.repo。如果您不再打算使用此 repo,您​​可以在该目录中查找相应的 repo 文件并将其删除。

请注意,由于您似乎正在从 Red Hat Satellite 接收更新,Satellite 服务器可能会将 repo 重新添加到系统中。在这种情况下,请联系 Satellite 管理员以删除 repo。

相关内容