No, it is not. The solution is to reduce homelessness, drug addicts and poverty. If needed create actual spaces for homeless people to go to, where there are actually people/resources which can help them.
Turning libraries into homeless shelters and librarians into social workers is an absurd policy idea.