The "resource curse" that typically hits developing countries really doesn't accurately describe the principle problem: bad government. Brazil is no different whose politicians can most charitably be described as idiots (WSJ):
Buoyed by China trade, nationalist-minded politicians launched a foreign policy meant to reduce the role of the U.S. in Latin America. Brazil blocked a U.S. free-trade initiative for the Americas. They teamed with Venezuela to create a regional security council to supplant one that included the U.S. The foreign minister worked from an office with a huge map of the world upside down, offering the message that the era of emerging markets was at hand.
But the world wasn’t upside down. While Brazil tied itself more closely to anti-American governments like Venezuela, Argentina and Iran, some regional neighbors—Chile, Colombia and Peru—went around Brazil and cut individual free-trade deals with the U.S.
Brazil also started spending its commodity windfall before its oil and ore were out of the ground—another feature of the resource curse.
Anticipating commodity sales, the government spent increasingly heavily. Government banks supplied Brazilians with easy credit. Brazil subsidized energy bills, issued cheap loans to big companies with government ties and built stadiums to host global events such as the 2014 World Cup and the 2016 Olympics.