With food prices in the lead, the cost of living increased 0.6 percent last month, an uncomfortable 7.4 percent inflation rate compounded in annual terms, the Labor Department said yesterday.

Food prices shot up 1.2 percent for the second month in a row, and prices overall rose faster than wages. The department said the purchasing power of an average hour's work fell 0.6 percent in February, though it was still 1.1 percent above a year ago.

The inflation news has now been bad for the Carter administration for two months in a row. After behaving moderately in the last six months of last year, consumer prices jumped 0.8 percent in January.

Rebounding farm prices forcing up the price of food have been the main problem. Farm prices faltered last year, and that helped precipitate this year's demonstrations by farmers for increased federal aid. But even as Congress has acted on legislation to give that aid, farm prices are now recovering.

Carter, who was preoccupied with pumping up the economy and driving down unemployment his first year in office, is now being pressed by advisers to lean the other way, against inflation.

But anti-inflation policies almost always encounter resistance, and the president has yet to announce his new anti-inflation program.

The administration has forecast a 6.1 percent inflation rate this year. That is also its estimate of the so-called underlying inflation rate in the economy, the prevailing difference between hourly wage increases and increases per hour in worker output.

Carter has said he would like to shave about a half percentage point off this underlying rate this year.

But Federal Reserve Board Chairman G. William Miller has said the underlying rate may be tending in the other direction up toward about 7 percent or higher because of the declining value of the dollar (which makes imported goods more expensive) and other developments such as last year's legislation raising the minimum wage, cold weather and increases in agricultural price supports.

Some of the president's economic advisers had hoped he would announce a new anti-inflation program before his departure this week for South America and Africa, but now say they are not sure when he may make an announcement, nor how forceful it may be.

The 1.2 percent increase in food prices in each of the last two months is a 15.4 percent food inflation rate in annual terms. Food prices last month were 7.3 percent higher than a year ago; all consumer prices were up 6.4 percent from a year ago.

With the exception of clothing prices, which fell sharply in February, most other categories of consumer expenditures also rose briskly.

Besides increase in food - propelled by a 4.1 percent rise in beef prices and big increases for pork and poultry - medical care cost rose 0.8 percent, or 10 percent annually.

Housing costs rose 8 percent in January, and analysts see continued inflation in the housing sector because of rising lumber prices and an expected increase in mortgage rates.

Because of new-car increases, the overall transportation category rose 0.6 percent. Prices of fuel and utilities rose 0.8 percent, primarily because of increases in electricity costs and natural gas prices. Both can be expected to rise in the future.

The consumer price index stood at 188.4 percent of its 1967 average, which means that a selection of goods and services that cost $10 in 1967 cost $18.84 last month.

The report for February was the second that the Labor Department has released with a consumer price index for all urban dwellers. Until January 1978, the department's Bureau of Labor Statistics compiled a consumer price index that represented the purchases of urban wage earners and clerical workers only.

The new index is supposed to represent the average purchases of all urban residents clerical, white-collar, unemployed people and welfare recipients, among others.

The department will continue to produce a revised consumer price index for urban clerical workers only, in part because of pressure from labor unions. The narrower consumer price index also rose 0.6 percent in February and 0.8 percent in January.