Yes, you can install spyware via a text message but it is not a simple task. It required lots of technical knowledge so for a normal person it is not possible.