language: node_js
node_js:
    - "0.12"
install:
    - sudo apt-get update -qq
    - sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
    - npm install -g npm
    - npm install
before_script:
    - npm install -g grunt-cli

language: node_js
node_js:
    - "0.12"
install:
    - sudo apt-get update -y -qq
    - sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
    - npm install -g npm
    - npm install
before_script:
    - npm install -g grunt-cli

Add -y to apt-get update, although it should not be needed
Add -y to apt-get update, although it should not be needed

The build is still failing, because npm install runs before the apt-get finishes
