在 ubuntu 上安装 semantic-UI(终端错误)

installing semantic-UI on ubuntu (terminal error)

我按照说明操作:http://learnsemantic.com/guide/expert.html

我已经到了应该 运行 这个命令的地步:

npm install -g gulp

我得到以下结果:

npm ERR!      'Object.oncomplete (fs.js:107:15)' ] }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.19.0-16-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "gulp"
npm ERR! cwd /home/yannick
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules
npm ERR! fstream_path /usr/local/lib/node_modules/gulp
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules'
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/yannick/npm-debug.log
npm ERR! not ok code 0

谁能告诉我我做错了什么?

关键是第3行,

npm ERR! Please try running this command again as root/Administrator.

sudo 用户身份尝试 运行 命令,或者更好地确保您可以全局安装 npm 模块而无需 sudo 命令。我上次使用的指南可以在这里找到:https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md

已解决!答案可以在这里找到:https://github.com/joyent/node/issues/3911#issuecomment-8956154

:)