Before there were such things as public education and public libraries, communities looked after these things on an individual basis. A "Mechanics' Institute" was often formed in small towns in Canada, the western U.S., Australia and New Zealand - possibly other places too. Members paid a nominal fee for access to the institute's resources. The mandate was usually something like this: "To develop practical vocational education for the mechanics, artisans and manufacturers generally." Usually adult education classes were offered, and a small collection of books was available. Many small town libraries began under the auspices of the local Mechanics' Institute, eventually finding permanent homes through grants from the Andrew Carnegie Foundation.
I think there was an overall parent "Mechanics' Institute" organization, but I can't find any reliable information on it.