Problem formatting disk in MacOS Sierra.
Yesterday I formatted the hard drive of my Mac because it was bringing me problems the disk, and I did not want to detect the USB, used first aid and sent me error, and some partitions did not mount them.What I did was to format the hard drive, enter the recovery part and everything that follows, would not let me format the disk in APFS mode then I format it in Mac format (journaled), well now I have it, I give to install the operating system, but at the end all the progress bar of the operating system, it tells me that an error occurred that re-runs the application, I saw several tutorials and nothing, I do not know if you could help me solve the problem somehow, the Mac I have is i5 with 2 cores, with Intel graphics, Is 21.5 inches and came with MacOS sierra installed by default.
iMac 21.5″