House Republicans on Thursday elected Kevin McCarthy as majority leader, succeeding Eric Cantor, who is relinquishing the job after losing his primary election in an upset.