Not true for Berlin, though. If you regularily visit some hackerspaces (or other meetups with like-minded people, such as various user groups such as Emacs user group, political groups such as FSFE, whatever), or go to university and study there, you have very good chances finding friends, some of whom may turn out to be very good friends.
Sometimes it seems hard to get into groups, but usually this is just a matter of having the courage to talk to people, and not so much a matter of being actively rejected by others (although that happens sometimes, too, of course, because every "club" has some low percentage of anti-social-minded people, but those people are easy to ignore).
I assume this is true for the other large cities in Germany as well (Hamburg, Frankfurt/Main, Munich, Bremen, etc.) but I don't know for sure.
EDIT: To those who downvoted: Do you care to elaborate? Did you have different experiences in Berlin? (especially as technically-minded people)