If you are installing sitecore commerce for the first time on the sitecore instance, this issue will less likely to happen.This issue happens mostly in the scenario where the installation is halted for any other errors occurred and run a re installation of the sitecore commerce.
To fix this issue here is what i needed to do
Added https binding to the sitecore instance i am running the commerce installation.(https://local.sitecore902
Remove all the sitecore commerce related folders in sitecore.
Delete all the sitecore related web sites(Ops,Minions,Shops,Aiuthoring,Bizfx and identity server)
remove the databases installed in previous installation( SitecoreCommerce9_Global and SitecoreCommerce9_SharedEnvironments)
Remove all the solr cores of sitecore commerce(CustomersScope,CatalogItemsScope,OrdersScope)
Delete the certificates(local.storefront)
Rerun the sitecore commerce installation now.It should go through.