You have to be very, very consistent with puppies, and I hear male puppies can take a bit longer.
You received excellent advice in your first post: My lab is 4 months and still potties inside alot. Should I be worried?
Are you following it? Explain EXACTLY what you are doing. When you say he pees when he is alone- does that mean alone in the house? Right there, that would be a major problem. You say you "can't" hold him on a leash until he pees- are you walking around with him? The motion should trigger his need to pee. Are you throwing him a party when he potties outside?
I'm glad you are seeking advice, but know that it is completely normal 5 month old dog who has not had the consistent routines suggested before to pee in the house. This is not something puppies figure out on their own.
Oh, and you need an enzyme killer to clean up accidents in your house.