No, it wasn't.
The country who was in a position to block a British dream of having a rail from one coast of Africa to another was another country with the same ambition: Portugal. Portugal wanted to build one from the Atlantic to the Indian Ocean, to join its colonies of Angola and Mozambique.