Know-it-all

A person who acts as if he or she knows everything.

The librarian is a know-it-all and nobody likes to be around him.