This February 2009 accident report is provided by the National Transportation Safety Board. Published as an educational tool, it is intended to help pilots learn from the misfortunes of others.
Aircraft: Piper Comanche. Injuries: None. Location: Mineral Wells, Texas. Aircraft damage: Substantial.
What reportedly happened: The airplane’s annual inspection was done 18 days before the flight. While departing the airport, the landing gear failed to fully retract. Several attempts were made by the pilot to fully lower the landing gear, including the use of the emergency landing gear system. The pilot elected to return to the airport and land in the grass parallel to the runway with the gear still partially deployed. During the landing the firewall was damaged. The post-incident inspection revealed that the cables that operate the landing gear were insufficiently lubricated.
Probable cause: The failure of the A&P to ensure proper lubrication of wire cables in the landing gear system during the annual inspection.
For more information: NTSB.gov

This makes no sense. The cables the NTSB specifies are not identified and the only cables that are likely suspects are the push/pull cables that run from the transmission to the landing gear. These cables should be lubricated with only a dry lubricant anyway since mechanics who introduce grease lead to dirt binding with the grease over time and causing binding. The binding is what caused this gear to lock on the way up. The cure is to replace the push/pull cables with new units – which are available.