I'm not sure if this is the correct place to post this since I have solved the problem to my satisfaction. However, doing searches on Google and on the Arduino forum, while I found similar issues, I didn't find this solution. I'm hoping that this information is new and may help others with similar issues.
I purchased an Arduino Mega 2560 about a month ago. The first thing I did when I received my parcel was to plug it into a USB port. It seemed to boot fine. The LED on pin 13 flashed as it should. However, when I tried to upload my own test sketch to the board, the IDE displayed the following error message repeatedly:
avrdude: stk500_2_ReceiveMessage(): timeout
I performed a loopback test which showed no errors. I deleted the serial device from the OS X Network Preferences device list. Still, no go.
I often use the USB 1.1 hub built into my 10 year old Apple Pro keyboard since the ports on the back of my Mac Mini are inconvenient for devices not permanently plugged in. The hub works perfectly fine, and I often use it to transfer small amounts of data to/from usb keys. However, having no other ideas at the moment, I decided to plug the Arduino directly into the Mini, which has solved the problem. I have since programmed my Arduino several times over without further problems.
I don't know if this may be a problem with the firmware of the Atmega 8U2 used as a USB interface chip, but I thought it might be nice to have this problem and solution on record in case someone else has similar issues.