Finding the closest library.