In Season 1 Episode 11, Heliopolis, SG-1 travels to a planet where we first learn of the alliance for 4 races, and discover that Ernest Littlefield had survived his trip through the gate in 1945, and had been living alone until they arrived, some 50+ years later. The wiki page for Heliopolis states that the planet's life had been completely extinguished, and Ernest was the first, and only, living thing on the planet. So, how did one man, who had no supplies, manage to live for 50 years? Should he not have died of starvation after only a month or two after arriving?
The long-shot of the castle shows that it's directly adjacent to an ocean. The land in the distance appears to have green on it. Since we know that he didn't take food supplies, it seems highly likely that Ernest subsisted on fish, whatever wildlife he could trap and whatever plants/greenery he could find, noting that when he first talks to Daniel he hands him a piece of fruit (h/t to @KeralynBrooks for spotting that).
For the record, the wiki source that claims that the planet is entirely devoid of life is from a mission pack in the (canon) role-playing game Stargate: Fantastic Frontiers, and as such can be dismissed entirely since it conflicts with what we see on screen.
When they say the planet was devoid of life, I'm sure they specifically meant sentient life. The planet was unoccupied by civilization, therefore it was a neutral meeting ground for multiple civilizations.
The episode clearly shows evidence of plant life, which means the planet definitely supports life, and there were things he could eat. How he managed to not eat something poisonous or toxic in 50 years on an alien planet is remarkable.