No its right ,
but i forgot to say the all error " an error occured installing os x . to use appe diagnostics to check your mac hardware shut down, pressing the power button , and immediately holding 'D' key unitil begins "
and i pressed D and nothing happened and i'm using Yosemite right now and working perfect
but Xcode 9/10 cannot run on yosemite btw and my hardware is :