The best way to learn a solo depends on your current ability and your preferred learning style. Since I don't know either as it relates to you, allow me to offer what I personally do when learning a solo.
I perform mostly covers either solo or as part of a duo or full band. When covering a solo, my goal is to play something that the audience will recognize as the song I am playing. In other words something that "sounds" authentic.
I very rarely attempt to play the exact note for note version of a guitar solo on particular recording. There are several reasons for this. First, even the original artists will often change the solos from one performance to the next. Often these changes are subtle and barely recognizable unless you do a forensic analysis by replaying the recording and or slowing it down. Sometimes the change is more noticeable. I think it makes a live performance more interesting if the solo's are played different than on the record. Sometimes what they do in the studio is difficult to reproduce on stage and that will often account for the difference between the live version and the studio version of a song.
Another reason that I don't feel the need to analyze and learn a note for note transcription is that I don't feel like spending that much time learning to play a solo note for note. Instead I would prefer to spend my learning time learning another cover.
I don't think the audiences I play to would notice if I play the solo a little different than the original artist - as long as it's close. Nor do I think they expect me to play it EXACTLY like the original artist. But if I only knew a handful of songs and could not play any of their requests because I was busy learning the exact note for note solo instead of learning new material - the audience would notice that.
Finally, in many cases I don't have the same effects, or same type of guitar, or the skill level necessary to pull of an exact duplicate of what I may hear on a particular version of a particular artists performing a guitar solo. So since I know that no matter how much time I spend trying to sound just like Stevie Rae Vaughn on a particular solo, I recognize that I never will - so I try to get close - but make it my own interpretation.
I am a play by ear learner and don't do well with tabs or sheet music. Most tabs available on line are nothing more than someones interpretation of how the piece was played and as you know, with a guitar, there are multiple places where any given note in any given pitch class can be played.
Another point to consider is that there are always alternate ways to play any solo on a guitar and the way it is played by one artist on the video, might not be the easiest way for you or I to play the same solo. I personally have very short fingers so I can't always make the stretches some guitarists make. Therefore I have to adapt the way I play a solo and where I play it on the neck, to what I can practically do given my physical limitations.
My ultimate goal is to create a reasonably authentic, recognizable rendition of the songs I cover - with the entertainment of the audience as my primary goal. I also like to have fun. Spending hours trying to learn the exact note for note version of a guitar solo complete with the same effects, bends, slides and other nuances, is not my personal idea of fun.
Some folks may enjoy getting it exactly like so and so played it on such and such concert as seen on a particular YouTube video. There is certainly nothing wrong with that if that's your thing. But personally, I would not fret (pun not intended) about getting the solos to sound exactly like what you hear on the record or how they did it on in a particular live show. Keep it simple and mostly - keep it fun.