Solution to yum Command failure when using proxy in LinuxFedora14

Source: Internet
Author: User
Error: Cannotretrieverepositorymetadata (repomd. xml) forrepository: updates-released.Pleaseverifyitspathandtryagain. (1) Modify Fedora. repo under/etc/yum. repos. d as follows: [fedora] name = Fedora $ rel

Error:

Error: Cannot retrieve repository metadata (repomd. xml) for repository: updates-released. Please verify its path and try again.

(1) Modify Fedora. repo below/etc/yum. repos. d as follows:

[Fedora]
Name = Fedora $ releasever-$ basearch
Failovermethod = priority
# Baseurl = Signature/
Baseurl = http://mirrors.163.com/fedora/releases/?releasever/everything/#basearch/ OS/
# Items list = https://mirrors.fedoraproject.org/metalink? Repo = fedora-$ releasever & arch = $ basearch
Enabled = 1
Metadata_expire = 7d
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$ basearch

[Fedora-debuginfo]
Name = Fedora $ releasever-$ basearch-Debug
Failovermethod = priority
# Baseurl = Signature/
Baseurl = http://mirrors.163.com/fedora/releases/?releasever/everything/#basearch/debug/
# Items list = https://mirrors.fedoraproject.org/metalink? Repo = fedora-debug-$ releasever & arch = $ basearch
Enabled = 1
Metadata_expire = 7d
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$ basearch

[Fedora-source]
Name = Fedora $ releasever-Source
Failovermethod = priority
# Baseurl = Signature/
Baseurl = http://mirrors.163.com/fedora/releases/?releasever/everything/source/srpms/
# Items list = https://mirrors.fedoraproject.org/metalink? Repo = fedora-source-$ releasever & arch = $ basearch
Enabled = 1
Metadata_expire = 7d
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$ basearch

(2) modify the fedora-updates.repo below et c/yum. repos. d as follows:

[Updates]
Name = Fedora $ releasever-$ basearch-Updates
Failovermethod = priority
# Baseurl = http://download.fedoraproject.org/pub/fedora/linux/updates/?releasever/#basearch/
Baseurl = http://mirrors.163.com/fedora/updates/?releasever/?basearch/
# Items list = https://mirrors.fedoraproject.org/metalink? Repo = updates-released-f $ releasever & arch = $ basearch
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$ basearch

[Updates-debuginfo]
Name = Fedora $ releasever-$ basearch-Updates-Debug
Failovermethod = priority
# Baseurl = Signature/
Baseurl = http://mirrors.163.com/fedora/updates/?releasever/?basearch/debug/
# Items list = https://mirrors.fedoraproject.org/metalink? Repo = updates-released-debug-f $ releasever & arch = $ basearch
Enabled = 0
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$ basearch

[Updates-source]
Name = Fedora $ releasever-Updates Source
Failovermethod = priority
# Baseurl = http://download.fedoraproject.org/pub/fedora/linux/updates/?releasever/srpms/
Baseurl = http://mirrors.163.com/fedora/updates/?releasever/srpms/
# Items list = https://mirrors.fedoraproject.org/metalink? Repo = updates-released-source-f $ releasever & arch = $ basearch
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$ basearch

(3) set the/etc/yum. conf file and add the red part.

[Main]
Cachedir =/var/cache/yum/$ basearch/$ releasever
Keepcache = 0
Debuglevel = 2
Logfile =/var/log/yum. log
Exactarch = 1
Obsoletes = 1
Gpgcheck = 1
Plugins = 1
Installonly_limit = 3
Color = never
Proxy = http: // 192.168.3.119: 8081 (my proxy ip address and port number)

# This is the default, if you make this bigger yum won't see if the metadata
# Is newer on the remote and so you'll "gain" the bandwidth of not having
# Download the new metadata and "pay" for it by yum not having correct
# Information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# Interupting your command line usage, it's much better to have something
# Manually check the metadata once an hour (yum-updatesd will do this ).
# Metadata_expire = 90 m

# Put your repos here or in separate files named file. repo
# In/etc/yum. repos. d
~

(4) set the NIC Domain Name Server ifcfg-eth0

Vim/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE = eth0
HWADDR = 00: 18: 7D: 08: CB: F0
NM_CONTROLLED = yes
ONBOOT = yes
IPADDR = 192.168.3.253
BOOTPROTO = none
NETMASK = 255.255.255.0
TYPE = Ethernet
GATEWAY = 192.168.3.1
IPV6INIT = no
USERCTL = no
PREFIX = 24
DNS1 = XXX. XXX

Then you can # yum install ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.