i can not find any thing to fix this , i have i think tried everything it still gives this error and so i can't install P4wnP1. I,m using raspbian stretch with desktop as opposed to raspbian jessie lite and stretch lite .
Sorry to bother . it turns out it had nothing to do with raspbian , pi 0 w or P4wnP1. but it was my network providers fault who provided me with a faulty DNS which causing the said error. The installation problem was solved when I connected it to 3G network on a friends phone and his wifi. so it was just the network providers issue.