The Wimbledon champion said she had been unwell for the last two days and was out of breath during the warm-up before her match against Sorribes Tormo on Court Philippe Chatrier.
"I was not feeling good yesterday and the day before so I didn't sleep two nights and had some fever," Rybakina told a news conference.
"Today I really tried during the warm-up but I feel that the right decision is to withdraw because it's really tough to play in this condition.
"I saw the doctor, and they said that actually it's all a virus here in Paris. I guess with my allergy, my immune system just went down and I picked up something."
Kazakhstan's Rybakina was among the title favourites alongside holder Iga Swiatek and Australian Open champion Aryna Sabalenka after winning the Rome title in the build-up to the claycourt Grand Slam.
"I'm really upset not be able to play, but I guess that's life," Rybakina added. "There is a lot of ups and downs. Today I just wanted to give 100%, and obviously I'm far from being 100%.
"I was actually coming positive here, but you never know how you're going to feel. It was unlucky for me. I'll try to recover and do my best to be prepared for the grass season already."
Moscow-born Rybakina said she hoped to be fully fit for the European grasscourt swing ahead of her Wimbledon title defence.
"Well, for now the focus for sure is to get better. But the plan was to play Berlin, Eastbourne and Wimbledon," she said.
"There is not many tournaments on grass, but it's most important to get healthy again. That's the plan."
Spain's Sorribes Tormo moves into the fourth round where she will take on 23rd seed Ekaterina Alexandrova or 14th seed Beatriz Haddad Maia.