Undated (AP) _ Former President Jimmy Carter says he thinks the United States was wrong to bomb Libya because innocent people were killed, but former President Gerald Ford believes President Reagan did ''exactly the right thing.''

Richard Nixon, the third living ex-president, had no comment on the U.S. attack on Libya, according to his office in New York.

Carter said his main objection to the raid was that innocent people were killed and injured. ''I have a personal aversion to anything that takes the lives of innocent people,'' he said Wednesday while speaking at a symposium at Georgia Tech in Atlanta.

He said Libyan leader Moammar Khadafy had perhaps received the worst punishment possible, ''and that is the death of his 15-month-old baby daughter.'' Doctors at Libya's Children's Hospital in Tripoli said Khadafy's adopted daughter, Hana, was among those killed in the U.S. air raids late Monday.

''If 17 years ago someone had killed Amy it would have been the worst blow that could be delivered to me,'' Carter said. ''I would have sworn as long as my life existed, I would retaliate.''

Ford said Reagan had no choice but to attack after obtaining evidence linking Khadafy's government with an April 5 terrorist bombing in West Berlin that killed a U.S. Army sergeant.

''Had I been president, I would have done exactly the same thing,'' he told a Benton Harbor, Mich., audience Wednesday night.

Ford also said that he was not surprised at the outcry from Arab countries, and that Arab leaders automatically criticize the United States.

''Then they come around to the back door of the State Department or White House and say, 'We're glad you did it. You did the right thing, but we can't say that.' That's kind of gutless, in my opinion,'' Ford said.

Carter stressed that he did not mean to criticize Reagan and acknowledged that the United States had to act against terrorism.

However, he said that by carrying out the raid, the United States may have inadvertently helped terrorists achieve their main goals, which he defined as joining the international debate on an equal level, getting publicity and restricting the movement of free people.

''I think in every one of these respects, Khadafy has achieved his goals,'' Carter said. ''Khadafy, who was an outcast in most of the Moslem world a few months ago is now a hero. We've been almost universally condemned by the rest of the world, and the bombing itself may have been in violation of international law.''