At least six people were killed and seven injured after a gunman tried to kill an Islamist in a Palestinian refugee camp in Lebanon.