This was an issue with a Site migrated to SharePoint 2013 from 2010. We had exported and then imported a Publishing Site to find we could not activate the Community Site Feature.
The error in ULS was
Feature Activation: Threw an exception, attempting to roll back. Feature ‘CommunitySite’ (ID: ‘961d6a9c-4388-4cf2-9733-38ee8c89afd4’). Exception: Microsoft.SharePoint.SPException: The file is not checked out. You must first check out this document before making changes. —> System.Runtime.InteropServices.COMException: The file is not checked out. You must first check out this document before making changes…..
Solution: first activate the Community Site Feature in the new Site before importing