Koheles 12:12 “And more than that, my son, be careful, making many books without end…”
The Targum Yerushalmi translates this verse as encouraging writing books. “…be careful to make many books without end…” This is also how R’ Sa’adia Gaon explains this verse. R. Yitzhak Sorotzkin (Rinas Yitzhak, Koheles, ad loc.) connects this to the statement in Sefer Hasidim (530) that one who receives the gift of a Torah insight but does not share it with others by writing it down is guilty of stealing that insight.
However, R. Yonah Ibn Janah in his Sefer Ha-Rikmah (beginning of ch. 2) argues at length that “hizaher – be careful” is always about something that one should not do and never an exhortation to do something. Additionally, he suggest that “making” books in Biblical Hebrew never means writing books but, rather, acquiring them. Thus, the verse is a warning not to buy too many books. Ibn Ezra briefly offers the same explanation, and it seems to find an echo in midrashim as well. Perhaps it is a caution against extra-biblical books or simply a warning that too much information will overwhelm a person. (See Da’as Mikra, Koheles, p. 77 n. 14)
This explanation, though, is quite surprising. The exact opposite view is found in other areas of rabbinic thought. The Mishnah in Avos (1:4) states “Yose ben Yo’ezer of Tzereidah said: Make your house a gathering place for scholars” which R. Hayim Volozhiner (Ruah Hayim, ad loc.) explains includes creating a library of Torah books. By surrounding oneself with the works of scholars, one makes one’s house a gatherin place for them.
Perhaps more importantly, the last commandment listed in the Torah is the obligation on every man to write a Torah scroll. The Rosh famously ruled that in today’s age, when people do not learn directly from a Torah scroll but from books, the commandment is to acquire Torah books from which to learn. Whether that is in addition or instead of writing a Torah scroll is a separate issue. However, what is clear is that normative halakhah holds that one fulfills a biblical obligation by buying books of Torah from which to study. (See the Tur, Shulhan Arukh and commentaries to Yoreh De’ah 270)
Certainly contemporary practice, which is frequently a good guage for which of two halakhic views has been accepted, is that in this age of mass publication and widespread literacy owning Torah books is a worthy goal.