Six challengers to Mayor Marion Barry offered their own solutions to the District's problems of prisons and drug abuse last night at the first mayoral candidates forum, but the incumbent dismissed their ideas as impractical.

"The answers I have heard so far show a lack of understanding of the problems," Barry said in discussing whether to build a prison in the District.

While Barry was left to defend his proposal for a drug treatment prison in Ward 6, the challengers offered a variety of alternatives -- all politically more palatable to voters who generally do not want a new prison in the District.

The first forum for the mayor and his opponents was marked by the absence of Republican Carol Schwartz, an at-large member of the D.C. Council. Schwartz had traveled to Midland, Tex., for the 25th reunion of her high school class.

The Fort Lincoln Civic Association sponsored the candidates' session, which was at times boisterous and featured remarks by Democrat Calvin Gurley and Statehood Party candidate Dennis Sobin that left the audience of about 150 in an uproar.

Barry, the last candidate to arrive, evoked repeated choruses of "Four more years! Four more years!" from the crowd. In the midst of the cheering, Alvin C. Frost, a Barry critic who was fired from his city job, commented, "I think they are referring to Ivanhoe Donaldson."

Donaldson, a former deputy mayor and close political associate of Barry, is serving a seven-year prison term on federal fraud and cover-up charges.

Several candidates questioned the Barry administration's ethics. Independent Brian Moore cited a "moral vacuum" in the D.C. government, and Sobin, responding to a question about drugs, recalled that Barry last year had disclosed having a "personal relationship" with convicted cocaine distributor Karen K. Johnson, whom Barry had visited at her apartment.

The remark drew boos, but Sobin protested, "I believe neither of them used drugs or had sex."

Gurley also drew loud boos from the crowd when he called for "capital punishment for drug addicts who contribute to" the drug deaths of other persons. Later, he corrected himself to say he meant "drug dealers" who contribute to others' demise.

On the prison issue, Democrat Mattie Taylor, Moore and Sobin said they were opposed to any prison construction and Gurley said he favored expansion of the city's prison facilities at Lorton, in suburban Fairfax.

Barry, who has been under intense pressure to build a new facility to relieve overcrowding, responded that Congress has virtually forced the city to build a prison inside the District.

"Congress controls our money," he said. "Sen. John W. Warner R-Va. and Sen. Paul S. Trible R-Va. . . . are not about to let us build any more prisons at Lorton."

Frost startled the audience with his proposal to add landfill to the Potomac River and build a prison on it. Referring to the neighboring states of Virginia and Maryland, he added, "Let's put it in the river and everybody can share it."

Bobby Johnson, a self-employed printer who said he plans to run as an independent, said he had a secret plan to solve the prison crisis. But he doesn't want to reveal it, he said, turning to the mayor, "because he will take it and get credit."