Libraries aren't going anywhere. I think they will transition from relatively large storage place facility physical books, to a hub for study. It's already happened, really. All my collegiate library studying took place via online databases like EBSCOhost, but this much is pretty obvious.
What is more obscure, and will be more interesting to see is how the library evolves culturally in the coming years.