mongodb - 无法安装领域-cli (Mac)
问题描述
我正在关注这个领域教程,但在安装领域-cli 时遇到了问题。我正在运行
sudo npm install -g mongodb-realm-cli
,这给了我以下错误:
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
/usr/local/bin/realm-cli -> /usr/local/lib/node_modules/mongodb-realm-cli/wrapper.js
> mongodb-realm-cli@2.1.0 install /usr/local/lib/node_modules/mongodb-realm-cli
> node install.js
downloading "realm-cli" from "https://s3.amazonaws.com/realm-clis/realm_cli_rhel70_97239c6794575bad1486a178501366cea7e7d399_21_08_16_19_49_31/macos-amd64/realm-cli"
failed to download Realm CLI: Error: EACCES: permission denied, open '/usr/local/lib/node_modules/mongodb-realm-cli/realm-cli'
at Object.openSync (fs.js:498:3)
at /usr/local/lib/node_modules/mongodb-realm-cli/install.js:62:24
at new Promise (<anonymous>)
at requstBinary (/usr/local/lib/node_modules/mongodb-realm-cli/install.js:56:10)
at Object.<anonymous> (/usr/local/lib/node_modules/mongodb-realm-cli/install.js:101:1)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/usr/local/lib/node_modules/mongodb-realm-cli/realm-cli'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mongodb-realm-cli@2.1.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mongodb-realm-cli@2.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
这是我到目前为止所拥有的:node -v: 14.17.6, npm -v: 6.14.15
PS:它在 Windows 10 上运行良好。
提前致谢!
解决方案
推荐阅读
- javascript - jquery.html jquery 在由 ajax 加载时不起作用
- sql - Presto 中每行的最小值
- excel - 在随机 5x5 数组中查找值的单元格引用
- python - 如何在尝试修复 Flask-Dance 中的“无法在没有关联用户的情况下获取 OAuth 令牌”错误时修复 SQLAlchemy IntegrityError
- python - 如何使用 pandas 将整个列字符串转换为数据框中的浮点数?
- ms-access - 如何在不使用键的情况下从集合中删除值?
- spring-boot - JobScope 和覆盖 bean
- c# - 如何同时使用 2 个实体表?
- python - 比较时间和价值
- scala - 有没有办法获取早期管道 Scala 进程 (#|) 的退出代码?