Alan,
This is not at all uncommon, fortunately there are several solvents that will remove the glue residue, however most will also attack latex, so some care must be exercided in their use.
Solvent of this nature should not be applied direct to the carpet but to a terry towel and the carpet pile dampened in a contolled manner, avoiding contact with the backing. Avoid aggresive rubbing, allowing the solvent time to soften the adhesive.
Suitable solvents include Prochem Solvall, Chemspec POG, d'Limonene and my current favourite, Solutions Eco Spotter (Micro-splitter + Alcohol).
John.