His husband, Stan Cadwallader, confirmed the death. He said that Mr. Nabors’s health had been declining for a year and that his immune system had been suppressed since he underwent a liver transplant in 1994.
At the time, Mr. Nabors announced that he had contracted hepatitis B in India several years earlier when he cut himself shaving with a contaminated straight razor, which he had bought there.
Gomer Pyle, the character that so indelibly stamped Mr. Nabors’s career, originated in 1962 as a supporting role on “The Andy Griffith Show,” a bucolic CBS comedy that had been running since 1960. Gomer was a guileless, sweet-natured gas-station attendant in Mayberry, N.C., a sleepy fictional town where Mr. Griffith played the widower sheriff, Don Knotts his deputy, Ron Howard his son and Frances Bavier his matronly Aunt Bee.
Mr. Nabors’s character, a village innocent who tended to make a mess of things, became a favorite, and his sheepish “gawwwleee” and wide-eyed “shazam!” became popular catchphrases.
In 1964, the character was spun off into his own series, “Gomer Pyle, U.S.M.C.,” in which Gomer, still bumbling but well meaning, joined the Marines and, on a weekly basis, tried the patience of his loudmouthed drill sergeant, Vince Carter (Frank Sutton).
Gomer was a recognizable kind of American hero: a good-hearted, gentle, unsophisticated sort (not unlike Forrest Gump of a later era) who encounters a harder, more cynical modern world — in this case embodied by Southern California — and helps redeem it.
“Sheldon Leonard and his co-creators astutely chose a Southern California Marine base for their hero,” Gerard Jones wrote in his 1992 history of the American sitcom, “Honey, I’m Home!”
He added: “In various episodes Gomer connected with the movie and TV industries, the music business, the surf scene, the Beverly Hills rich — all the easy symbols of modernity. Everywhere he went he left a trail of fond smiles and innocence — at least temporarily — restored.”
But “one thing Gomer never, ever connected with,” Mr. Jones added, “was the Vietnam War,” which was raging at the time, just as he and his neighbors in Mayberry had remained isolated from the civil rights movement in the South. “He somehow existed in the peacetime military when there was no peace.”
Mr. Nabors first showed off his booming singing voice for a national TV audience in a guest appearance on “The Danny Kaye Show” in 1964. To fans who knew him only as Gomer, his full-throated, almost operatic baritone was surprisingly striking, if strangely incongruous.
“Gomer Pyle, U.S.M.C.” lasted five seasons, ending in 1969, when Mr. Nabors was given his own CBS variety show and with it more opportunities to sing. “The Jim Nabors Hour” lasted until 1971. In 1975 and 1976, he and Ruth Buzzi starred as a pair of androids in the ABC children’s show “The Lost Saucer.” He was a frequent guest on “The Carol Burnett Show.”