I'm having a problem with yum also. Here's my analysis:
My problem is because several networking utilities can't resolve the domains unless forced to use IPv4. Similar to this:
$ pup
ERROR: Cannot open/read repomd.xml file for repository: core
ERROR: failure: repodata/repomd.xml from core: [Errno 256] No more mirrors to try.
I checked curl and wget using the same URLs specified in yum.conf:baseurl. Neither worked unless I forced IPv4. I then disabled IPv6 (echo
"alias net-pf-10 off" >> /etc/modprobe.conf) and curl started working again but wget, pup and yum still fail. I built wget from source and it works. The wget issue can be easily worked around by forcing IPv4 but I don't know how to do that with pup and yum.
I compiled the following simple program, supplied by Hrvoje Niksic from the wget mail list, and it also works. So the problem isn't specifically due to the getaddrinfo API.
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
#include <errno.h>
int main (int argc, char **argv)
{
int err;
struct addrinfo hints, *res;
const char *host = argv[1];
if (argc != 2)
return 2;
memset (&hints, 0, sizeof hints);
hints.ai_socktype = SOCK_STREAM;
hints.ai_family = AF_UNSPEC;
err = getaddrinfo (host, NULL, &hints, &res);
if (err != 0 || res == NULL)
printf ("failed resolving %s: %s.\n",
host, err != EAI_SYSTEM ? gai_strerror (err) : strerror (errno));
else
printf ("success\n");
return 0;
}
My assumption is that the builds in FC5 used a flag that is causing problems with some subset of hardware by forcing it to ignore IPv4. But with me being a complete noob to networking internals, I'm really completely clueless.
After reading
through, I was experiencing
bug 186592. After removing nisplus from the host line in /etc/nsswitch.conf and rebooting, wget, pup and yum are working.