A library may be established in any county, city, or town either (1) by its legislative body of its own initiative; or (2) upon the petition of one hundred taxpayers of such a governmental unit, the legislative body shall submit to a vote of the qualified electors thereof, at the next municipal or special election held therein (in the case of a city or town) or the next general election or special election held therein (in the case of a county), the question whether a library shall be established; and if a majority of the electors voting on the question vote in favor of the establishment of a library, the legislative body shall forthwith establish one.