升级系统到14.04后遇到了好多坑。今天遇到了:
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EPERM, utime '/home/hongshuaiyuan/.node-gyp/0.10.37'
gyp ERR! System Linux 3.16.0-30-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/hongshuaiyuan/kule/www.kuulabu.com/data/backends/IMServer/node_modules/memcached/node_modules/hashring
gyp ERR! node -v v0.10.37
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
解决方案如下:
1:首先确保自己装了sudo apt-get install node-gyp 。
2:npm install node-gyp -g,全局安装node-gyp。
3:rm -rf node_modules/
4:sudo npm cache clean
5: npm update .
如下就解决了上面的问题。
很奇怪的是我之前12.04的时候就没遇到这些问题。并且服务器也是14.04的也没遇到过这个问题。