Namibia has provisionally agreed on a deal with the European Union to sell its rare earth minerals, critical to the renewable energy.