President Carter was confronted with anger generated by lengthening lines at gas stations and an accusation of broken promises to Mexican-Americans today in the home state of one of his principal Democratic Party rivals, Gov. Edmund G. (Jerry) Brown Jr.

After a day of First-hand experience with the public anger over the worsening gasoline shortage, the president responded late today with a statement warning that the rest of the nation faces similar problems, which he blamed largely on Congress for not enacting his energy legislation.

"Too many people are afraid to vote for steps that may be a little unpopular," Carter said in a renewed plea for passage of his "windfall profits" tax on the oil industry and for an end to attempts to block his decontrol of oil prices.

The president also announced that he had directed Energy Secretary James R. Schlesinger to investigate the shortage here and recommend possible solutions and to "strictly enforce" gasoline allocation provisions to supply additional fuel to high use areas such as Southern California.

Carter acted near the end of a day that began in the East Los Angeles home of a Hispanic family, where he spent the night and where he was greeted this morning with a full-page advertisment in The Los Angeles Times.

"We are Mexican-Americans to whom you made promises when you were campaigning for the presidency in 1976," the ad declared. "In our view, you have kept none of these promises."

The ad was signed by officials of almost 40 Hispanic, labor and political organizations.

The ad was signed by officials of almost 40 Hispanic, labor and political organizations.

The same editions of the newspaper reported that the Carter administration in Washington has no immediate plans to divert additional gasoline to the state despite what were described as "vociferous complaints" from Californians.

On his way out to the airport this afternoon, Carter visited actor John Wayne at UCLA Medical Center to tell him "he had the love, affection and prayers of not only everybody in our own nation, but of millions of persons around the world."

Carter met with the veteran actor for about 15 minutes. Wayne, 71, was in stable condition, recovering from an operation on his intestines which turned up traces of cancer.

Carter came here from San Francisco Friday night, in a display of concern for Mexican-Americans-a growing force in national Democratic politics and an important element in Brown's California base.

Throughtout the day, however, the president was dogged by the specter of the gasoline shortage, which reached its peak on the day of his arrival in Los Angeles, when numerous fistfights among desperate motorists broke out at service stations.

Nor could Carter have been cheered by the modest crowd and tepid response that greeted him outside the Los Angeles County Courthouse, where he spoke at Cinco de Mayo festivities, a traditional celebration of the victory of Mexican troops over a French expeditionary force on May 5, 1862.

"Who would blow the gas to come to this," a local reporter remarked about the crowd, which was less than half the 10,000 people who attended the same ceremony last year.

In the crowd were "Viva Carter" signs, but also others demanding, "Carter Stop Gas Lines." When Kenneth Hahn, chairman of the county board of supervisors, presented the president with a gift, a man shouted, "What about the gas shortage?"

"Never mind the gas lines, I already spoke to the pressident, Hahn replied.

On Friday, while Carter was in Iowa, Brown acted on the gas situation, authorizing local officials to institute odd-even-day rationing. This evoked presidential praise for the man who is almost certain to challenge him next year for the Democratic presidential nomination. Brown acted "properly" and "responsibly," Carter said.

Today, the two men shared a platform at the Cinco de Mayo celebration, greeting each other with prefunctory handshakes and smiles. In a brief speech, the governor made a passing reference to energy issues, calling for collaboration among the United States, Mexico and Canada to form "the most powerful economic and energy-secure unit on the face of the earth."

Concentrating on Hispanic concerns, Carter pleged just treatment of illegal aliens in the United States and an effort to solve the problem of illegal immigrants who annually flood areas such as this from Mexico.