Learn melodies.... then learn some more....then learn them in all the keys... then start transcribing very easy solos.... then transcribe hard ones. Then you can solo.
AND the most important thing to remember when soloing is RHYTHM. Too many bass players play great licks but really square rhythms, which is actually pretty ironic

considering we are mostly rhythmical players.
And be patient. It is hard to play it cool when you only get 1 or 2 solos a gig. You are automatically gonna want too jump on your "A" game right away... however this usually takes away from another important soloing concept. Remember to shape your solo and not just have it be one stream of ideas with the same intensity.
Patience and persistence