You need to run the macosx_setup.command in the Arduino/ directory, and then shutdown your machine.
The program was uploaded correctly. The error means that an attempt to clean out the serial buffer before uploading failed. This means that you'll have problems uploading to the board if the board is sending out serial data. Also, the serial monitor won't work.