angular/cli在安装时给我错误信息

angular/cli在安装时给我错误信息,angular,angular-cli,Angular,Angular Cli,安装后,当我在终端中安装angular时,会出现此错误 我已安装: 节点v6.10.3 npm ERR! Darwin 17.7.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@angular/cli" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! path /usr/local/lib/node_modules npm ERR!

安装后,当我在终端中安装angular时,会出现此错误 我已安装: 节点v6.10.3

npm ERR! Darwin 17.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@angular/cli"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/macmini/npm-debug.log

请在系统中以管理模式尝试

npm install -g @angular/cl

您是否尝试过以root用户身份运行它?sudo npm安装-g@angular/cli