When it rains, it leaks.

That is the story at the John F. Kennedy Library and Museum in Boston, which houses thousands of photographs, Kennedy's presidential papers and Ernest Hemingway's letters and manuscripts.

Officials say the leaks are not threatening the collections. But some are bad enough that during a hard rain, buckets have to be placed in strategic spots, preferably out of public sight.

"Most of them are fairly minor," said Brad Gerratt, the library's director. "But when you see water coming into the building, you want to take some action."

So does the National Archives and Records Administration, which includes the Kennedy and nine other presidential libraries. The agency predicts it will cost $6 million to $7 million to fix.

"We need to take remedial action by the year 2002, in any case," said archives spokesman Gerald George. The archives may request the first part of the money from Congress for the fiscal year starting Oct. 1, 2000.

Gerratt is not worried about what may happen in the meantime because consulting engineers who studied the leaks last summer found no imminent threat of drastic deterioration. Some leaks were temporarily patched.

"I'm comfortable with their recommendation that we have a couple of years left," Gerratt said.

Still, no one wants to wait too long.

The nine-story library, built in the late 1970s on Dorcester Bay just south of Boston, houses all materials from the Kennedy White House, including the president's notes, records and files. Also stored are records of presidential friends and associates, including the president's brother and attorney general, Robert F. Kennedy, speechwriter Theodore Sorensen and national security adviser McGeorge Bundy.

The collection includes several hundred thousand photographs that were part of the White House collection, gifts Kennedy received as president and gifts that were sent to his widow, Jacqueline, after he was assassinated Nov. 22, 1963.

The library also houses Hemingway's papers, including letters and manuscripts. Hemingway's widow, Mary, was able to travel to Cuba to retrieve her husband's belongings in the tense period after the 1961 Bay of Pigs invasion with a visa granted by the Kennedy administration. She offered the papers to the library in 1964.

Some of the leaks are in archival and museum storage areas, although important papers are kept away from problem areas, Gerratt said. Other leaks are in the front lobby windows, office windows, and the library's glass pavilion.

The library's entrance plaza also needs rebuilding. It has waterproofing problems, and the granite paving system is buckling due to clogged expansion joints and poor drainage.

Such problems "endanger the facility and its holdings," according to an internal archives document. "It is imperative that these problems be addressed as quickly as possible to prevent further deterioration and to ensure that the irreplaceable holdings of the library are protected."

CAPTION: The John F. Kennedy Library and Museum in Boston.