Learning a guitar solo is a lot different then learning a guitar rhythm. Solos are usually much longer and non-repeating. Because of this fact, you will learn and memorize solos in small parts.
You can see on the solo below I have it separated into parts. Learn and memorize part 1 and then part 2. Put them together as a whole. Next, learn part 3 and then put that together with part 1 and 2. Repeat this process until the end.
After learning each part you will put them all together. Remember to focus on the solo rhythm progression . The chord in red is the beginning of each solo rhythm progression.