If you can find the matching CPU it should work. Re-install the heat sink properly (of course) and it's a good idea to wipe off the old thermal paste and re-apply before installing the cooler.
What CPU is this? It must be a modern AMD chip or an older Intel chip from before they moved the pins to the motherboard socket. Getting the exact match should guarantee compatibility with the motherboard but something similar might work depending on the board. If you go to the board maker's site there should be a CPU Compatibility list you can check against.