After maybe a month or two, a beginner should be able to play their first beginner guitar solo. Of course the guatrist wil not be able to give a Slash solo, but they will be able to entertain their family and friends with a cool tune.
In my opinion, as soon as you have started playing, you should be able to do guitar solos, even if they are of easy and simple ability. After experience, you will progress to harder solos.