Err... install the packages you want the way you're used to? You may want to use apt-cache search or synaptic to find out which packages you want.
Btw, do you still have a working base system? If not, I think reinstalling is the easiest way out.
I would guess that your problem is caused by a C++ ABI conflict, but I'm far from sure.
Frankly, I'm not sure what your problem is, since you apparently know how to install stuff (samba in particular). Would you please be a little more specific?