One of the solutions says that I have to connect to internet and I do, second I have to remove "#" baseurl line in /etc/yum.repos.d/ directory. I did that and it still produced that error messages.
includes files for your reposities ("storage areas" on the net, where the packages are downloaded). If you can run yum update
fine, like you sound, yum should work itself all right. Next step is to make sure the reposities are working and ok, so go to /etc/yum.repos.d and cat the files inside -- there ought to be URLs, so try to ping them first. You should also use Google to find out (other) mirrors for FC5, like Livna, and add those reposities to your /etc/yum.repos.d (just like the other files there) -- then do yum update
and with yum try to install something from these mirrors.
I myself found yum a bit difficult to use, but as I said, if the update is working and produces no errors, then it sounds like it's something with the reposities. If no mirror URL from the reposities works, yum gives an error (no more mirrors to try) because it doesn't know where to look anymore. That's why it's essential to find at least one mirror that works for sure and try out with it first. If that fails, it means the problem resides on your machine and/or connection, but if that succeeds, it means the problem is with the mirrors.