实际上,我正在尝试安装gTile,这需要Bazelisk。
在相对清洁的系统上:
$ sudo apt install npm
# takes almost 5 minutes, then:
$ npm install -g @bazel/bazelisk
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/@bazel%2fbazelisk failed, reason: unable to verify the first certificate
npm ERR! A complete log of this run can be found in:
npm ERR! /home/celiyah/.npm/_logs/2021-05-17T16_21_40_542Z-debug.log基于这就是答案,我还尝试了:
$ npm install ssl-root-cas
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/ssl-root-cas failed, reason: unable to verify the first certificate
npm ERR! A complete log of this run can be found in:
npm ERR! /home/celiyah/.npm/_logs/2021-05-17T16_23_34_826Z-debug.log看起来Ubuntu上的npm安装失败了吗?
$ npm --version
6.14.8是否有人遇到过此错误,以及如何修复它(而不禁用安全性)?
在这一点上,请不要提及关闭SSL。这是一台安全的机器,我想保持它的安全。:-)
发布于 2021-05-18 16:46:34
该错误在重新启动后消失;在您sudo apt install npm之后,重新启动计算机。
https://askubuntu.com/questions/1338922
复制相似问题