The problem likely isn't with your board, it isn't likely be an ubuntu related issue.
You made a syntax error in your code.
Regardless of the problem, we can only geuss at what might be wrong.. thus we can't give answers or solutions, untill we see the full sketch (preferably posted in between [ code]putyourcodehere[ /code] tags)