McLaren was diagnosed with concussion, following a blow to the head from a bouncer by Australian fast bowler Mitchell Johnson on Saturday.
“Ryan was admitted to a Johannesburg clinic on Sunday evening suffering from suspected concussion-related symptoms including worsening headaches and nausea, which started approximately 30 hours after the blow to his head,” Proteas team manager Dr Mohammed Moosajee said in a statement on Tuesday.
“His condition improved overnight and he was re-assessed by a neurologist as well as a leading sports physician with a special interest in concussion, Dr Jon Patricios.”
Moosajee said McLaren was doing much better and was discharged from hospital.
“But from a medical protocol point of view, any form of concussion is concerning enough to rule him out of the next Test match,” he said.
“He will be monitored over the next four to five days and will have further assessment done next week Monday to decide whether or not he can join up with the squad prior to the third Test in Cape Town.”
The selectors had not added a player as cover and would make use of the 14 players in the squad.
The Proteas suffered a 281 run defeat to Australia in the first Test on Saturday.
The second Test starts in Port Elizabeth on Thursday.