Please always post the exact version of Oracle Linux you are using, including platform and whether or not you are using a virtual machine.
I suggest to start with the instructions at Oracle Public Yum Server. Note that you need to remove the old files in /etc/yum.repos.d/first before downloading a newer version because wget does not overwrite any existing files, unless the output is specified.
Thanks ..my bad.
issue got resolved by removing one of these from etc/yum.repos.d/
public-yum repo file or the ULN
The message below seems to indicate there is some networking issue:
[Errno 4] IOError: <urlopen error (113, 'No route to host')>
Verify and make sure you have internet connectivity and can access the Oracle Public Yum Server.
yup , and why it's network probably because its not able to decide from which repo file to open the url ..
This has given you error while trying to setup repository metadata on your system.
You should have used below command and retired it would have worked.
yum clean all