[root@localhost ~]# yum install erlang
已加载插件:fastestmirror, langpacks
base | 3.6 kB 00:00:00
One of the configured repositories failed (未知),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:
yum-config-manager --disable <repoid>
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
[root@localhost ~]# cd /etc/
[root@localhost etc]# ls
cdabrt bluetooth csh.login favicon.png grub2.cfg ipsec.conf locale.conf my.cnf.d pbm2ppa.conf rc0.d sasl2 sudo.conf vconsole.conf
adjtime brltty cups fcoe grub.d ipsec.d localtime nanorc pinforc rc1.d scl sudoers vimrc
aliases brltty.conf cupshelpers festival gshadow ipsec.secrets login.defs netconfig pkcs11 rc2.d securetty sudoers.d virc
aliases.db centos-release dbus-1 filesystems gshadow- iscsi logrotate.conf NetworkManager pki rc3.d security sudo-ldap.conf vmware-tools
alsa certmonger dconf firewalld gss issue logrotate.d networks plymouth rc4.d selinux sysconfig vsftpd
alternatives cgconfig.conf default fonts gssproxy issue.net lvm nfsmount.conf pm rc5.d services sysctl.conf wgetrc
anacrontab cgrules.conf depmod.d fprintd.conf gtk-2.0 java machine-id nsswitch.conf pnm2ppa.conf rc6.d sestatus.conf sysctl.d wpa_supplicant
asound.conf cgsnapshot_blacklist.conf dhcp fstab gtk-3.0 jvm magic nsswitch.conf.bak polkit-1 rc.d setroubleshoot systemd wvdial.conf
at.deny chkconfig.d DIR_COLORS fuse.conf hba.conf jvm-commmon mailcap nsswitch.conf.rpmnew popt.d rc.local setuptool.d system-release X11
at-spi2 chrony.conf DIR_COLORS.256color gconf host.conf kdump.conf mail.rc ntp postfix redhat-release sgml system-release-cpe xdg
audisp chrony.keys DIR_COLORS.lightbgcolor gcrypt hostname kernel makedumpfile.conf.sample ntp.conf ppp request-key.conf shadow target xinetd.d
audit cifs-utils dnsmasq.conf gdbinit hosts krb5.conf man_db.conf numad.conf prelink.conf.d request-key.d shadow- terminfo xml
autofs_ldap_auth.conf colord.conf dnsmasq.d gdbinit.d hosts.allow ksmtuned.conf maven oddjob printcap resolv.conf shells tmpfiles.d yum
auto.master cron.d dracut.conf gdm hosts.deny ld.so.cache mime.types oddjobd.conf profile rpc skel trusted-key.key yum.conf
auto.master.d cron.daily dracut.conf.d ghostscript hp ld.so.conf mke2fs.conf oddjobd.conf.d profile.d rpm smartmontools tuned yum.repos.d
auto.misc cron.deny drirc glusterfs httpd ld.so.conf.d modprobe.d openldap protocols rsyncd.conf sos.conf udev
auto.net cron.hourly e2fsck.conf gnome-settings-daemon idmapd.conf libaudit.conf modules-load.d opt pulse rsyslog.conf speech-dispatcher udisks2
auto.smb cron.monthly enscript.cfg gnupg init.d libibverbs.d motd os-release purple rsyslog.d ssh unbound
avahi crontab environment GREP_COLORS inittab libnl mtab PackageKit qemu-ga rwtab ssl updatedb.conf
bash_completion.d cron.weekly ethertypes groff inputrc libreport mtools.conf pam.d qemu-kvm rwtab.d sssd UPower
bashrc crypttab exports group ipa libuser.conf multipath passwd radvd.conf samba statetab usb_modeswitch.conf
binfmt.d csh.cshrc exports.d group- iproute2 libvirt my.cnf passwd- rarfiles.lst sane.d statetab.d usb_modeswitch.d
[root@localhost etc]# cd yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Sources.repo CentOS-Vault.repo epel.repo epel-testing.repo
备注:::这里需要修改下 epel.repo 文件 需要将 其中 baseurl放开 另一个 注掉 然后 重启机器
[root@localhost yum.repos.d]# vi epel.repo
[root@localhost yum.repos.d]# reboot
[root@localhost yum.repos.d]# cat epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1