[英]Compiling with python on CentOS 8 returns errors
我已經安裝了最新的 node、npm 和 python 版本,但是當我嘗試安裝 leveldown(使用 npm)時出現以下錯誤:
> leveldown@2.1.1 install /root/apps/authentication/node_modules/leveldown
> prebuild-install || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=10.16.3 runtime=node arch=x64 platform=linux)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Linux 4.18.0-80.11.2.el8_0.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/apps/authentication/node_modules/leveldown
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN auth@1.0.0 No description
npm WARN auth@1.0.0 No repository field.
npm WARN auth@1.0.0 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! leveldown@2.1.1 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the leveldown@2.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-01-08T21_40_49_710Z-debug.log
似乎 python 不能在 CentOS 8 上編譯......歡迎任何幫助
僅供參考,我沒有直接使用 leveldown,但它是 PouchDB 的依賴項
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.