`npm i time`がエラーで入らない

## 環境

```bash
cat /etc/os-release
# NAME="Amazon Linux AMI"
# VERSION="2017.03"
# ID="amzn"
# ID_LIKE="rhel fedora"
# VERSION_ID="2017.03"
# PRETTY_NAME="Amazon Linux AMI 2017.03"
# ANSI_COLOR="0;33"
# CPE_NAME="cpe:/o:amazon:linux:2017.03:ga"
# HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
```

```bash
node -v
# v8.2.1
npm -v
# 5.3.0
```

## エラー文

```bash
error /home/ec2-user/.../node_modules/time: Command failed.
Exit code: 1
Command: sh
Arguments: -c node-gyp rebuild
Directory: /home/ec2-user/.../node_modules/time
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.2.1 | linux | x64
gyp http GET https://nodejs.org/download/release/v8.2.1/node-v8.2.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v8.2.1/node-v8.2.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v8.2.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v8.2.1/SHASUMS256.txt
gyp info spawn /usr/bin/python
gyp info spawn args [ '/home/ec2-user/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ec2-user/.../node_modules/time/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ec2-user/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ec2-user/.node-gyp/8.2.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/ec2-user/.node-gyp/8.2.1',
gyp info spawn args   '-Dnode_gyp_dir=/home/ec2-user/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/ec2-user/.node-gyp/8.2.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/ec2-user/.../node_modules/time',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/ec2-user/.../node_modules/time/build'
  CXX(target) Release/obj.target/time/src/time.o
make: g++: Command not found
make: *** [Release/obj.target/time/src/time.o] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/ec2-user/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.9.32-15.41.amzn1.x86_64
gyp ERR! command "/home/ec2-user/.nvm/versions/node/v8.2.1/bin/node" "/home/ec2-user/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ec2-user/.../node_modules/time
gyp ERR! node -v v8.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
make: Leaving directory `/home/ec2-user/.../node_modules/time/build'
```

## 解決

```bash
sudo yum install -y gcc gcc-c++
rm -rf node-modules ~/.node-gyp # 一応
```