Friendships can't just revolve around work. You need to find common ground outside work. Some will want to do it many won't or can't. Example, people with kids have limits on their time alone. So don't expect them to drop their responsibilities to do something they wouldn't normally do like go to a game on a Saturday alone. You need to include the family but families like to socialize with other families. You'll have to find a balance. Human relations are hard. You'll just need to figure it out for yourself. Do it but never be pushy. Once you have a friendship don't just drop it because you change jobs. You need to continue it.
There's also networking which is a way to connect with many people. I wouldn't call it friendship but it keeps you friendly with many people. There are many books on the subject so grab a few and get the gist.