as i went to install raspbian on my raspberry pi but it said available space 0 mb
Did you expand the space on the SD card? Go to terminal and enter config-raspi to expand it.