节点:拒绝许可。如何修复?
Nodejs的权限显示为空白。我不确定它是如何改变的。我无法删除或启动节点。如何解决这个问题?
/usr/bin# ls -la | grep node
lrwxrwxrwx 1 root root 45 Feb 1 14:40 corepack -> ../lib/node_modules/corepack/dist/corepack.js
---------- 1 root root 75421096 Feb 1 08:05 node
lrwxrwxrwx 1 root root 4 Jun 26 00:44 nodejs -> node
lrwxrwxrwx 1 root root 38 Feb 1 14:40 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root 38 Feb 1 14:40 npx -> ../lib/node_modules/npm/bin/npx-cli.js
/usr/bin# node
-bash: /usr/bin/node: Permission denied
/usr/bin# chmod -v 777 node
chmod: changing permissions of 'node': Operation not permitted
failed to change mode of 'node' from 0000 (---------) to 0777 (rwxrwxrwx)
The permission for nodejs is showing blank. I am not sure how it got changed. I am not able to remove or start node. How to fix this?
/usr/bin# ls -la | grep node
lrwxrwxrwx 1 root root 45 Feb 1 14:40 corepack -> ../lib/node_modules/corepack/dist/corepack.js
---------- 1 root root 75421096 Feb 1 08:05 node
lrwxrwxrwx 1 root root 4 Jun 26 00:44 nodejs -> node
lrwxrwxrwx 1 root root 38 Feb 1 14:40 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root 38 Feb 1 14:40 npx -> ../lib/node_modules/npm/bin/npx-cli.js
/usr/bin# node
-bash: /usr/bin/node: Permission denied
/usr/bin# chmod -v 777 node
chmod: changing permissions of 'node': Operation not permitted
failed to change mode of 'node' from 0000 (---------) to 0777 (rwxrwxrwx)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说,将节点重新安装NVM解决了问题:
安装NVM
NVM安装14
NVM使用14
For me, re-installing node with NVM solved the issue:
Install nvm
nvm install 14
nvm use 14