Minister for the Environment Phil Hogan has promised to assist the former residents of Priory Hall in Dublin.
About 300 apartment residents were forced to leave their home two years ago because they were deemed to be unsafe.
Speaking on RTÉ Radio, Mr Hogan said the Government was open to rebuilding the properties once legal action in the case was concluded.
Asked what commitment he could give that the residents would find a solution, he said he would "solve their problem".
"We may have to demolish and start again," he said.
The minister said he expects a report to be presented to the High Court next month as part of ongoing legal action into the circumstances that led to the homes being evacuated.
Mr Hogan said he would "act quickly" once this legal action was concluded, but he stopped short of giving a timeline for ministerial action.
The problem arose through no fault of the residents, he added.
He said it was an example of the deficiencies in building control legislation, which his Government inherited.
The cost of fixing the problem could be in the region of €10m to €12m, he added.
Mr Hogan also expressed his sympathy to the family of former Priory Hall resident Fiachra Daly, who took his own life.
Mr Hogan said that going on the recent correspondence and letters that have been published, the issues around Priory Hall were a source of great distress to Mr Daly.
Residents have called on the minister to discuss the long-term solution irrespective of action between them and Dublin City Council.