In Civilization or Civilization II, a library is a city improvement that increases the knowledge production in the city it is built in. It is easy to build libraries fairly early in the game, since all they need is the civilization advance of writing and 40 production shields.

Although they are easy to build and can be very useful, veteran civ players don't always focus on building libraries early on in every game. Since a library generates a 50% boost to knowledge production, the city must be generating at least 2 knowledge arrows to get a bonus, and at that level the library barely justifies its cost of upkeep. Especially in far flung empires, where trade is being lost to corruption, it can sometimes be hard to get a noticable bonus out of libraries. Many players choose instead to gain knowledge through increasing trade with caravans or roads, or by trading knowledge with other civilizations.

On the other hand, a small civilization on an island that can switch to a progressive form of government fairly quickly can benefit greatly by building a number of libraries and later universities.