So, the issue got resolved. The problem was in the ambari.repo file. The name of the packages were not written correctly. The .repo file that comes with the tar balls has three packages listed.
While, hdp.repo in the tar ball contains :
So, this creates a confusion regarding the correct names that should be given to the packages while installing from the local repository. As, the local repository has three packages : HDP, HDP-UTILS and Ambari. So, the convention followed in the inbuilt ambari.repo file does not actually match with the local repo packages. The names for the packages that I followed is:
This worked for me and packages got installed. I think the guidelines to change the names of the packages should be included in the documentation as it was very difficult to debug that the installation was failing because of it. Also, these names are case sensitive. “ambari-1.4″ didn’t work, but “Ambari-1.4″ did. In the documentation, the sample “hdp.repo” file has “ambari-1.x” as one of the package names. This should be corrected.