当我尝试在我的Raspberry Pi上安装带有NPM的Sodium时,安装总是失败并且抱怨它没有对/home/Captain/node_modules/libsodium
的写入权限。我正在通过sudo
运行安装命令,安装仍然不想工作。我只是把我的安装搞得一团糟吗?
$ sudo npm install sodium
npm WARN checkPermissions Missing write access to /home/Captain/node_modules/libsodium
npm WARN enoent ENOENT: no such file or directory, open '/home/Captain/package.json'
npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of uws@^0.14.5 but none is installed. You must install peer dependencies yourself.
npm WARN Captain No description
npm WARN Captain No repository field.
npm WARN Captain No README data
npm WARN Captain No license field.
npm ERR! path /home/Captain/node_modules/libsodium
npm ERR! code ELOOP
npm ERR! errno -40
npm ERR! syscall access
npm ERR! ELOOP: too many symbolic links encountered, access '/home/Captain/node_modules/libsodium'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-11-21T02_23_41_242Z-debug.log
不,你的设置很好。
试试这个命令
sudo chmod 777 /home/Captain/node_modules/libsodium
应该修复它。