msojocs / wechat-web-devtools-linux

适用于微信小程序的微信开发者工具 Linux移植版
MIT License
626 stars 62 forks source link

manjaro kde下安装报错 #93

Closed imic07 closed 11 months ago

imic07 commented 11 months ago

预先准备

  1. 删除 ~/.config/wechat-devtools 目录,重新打开项目(若发布 issue 即默认阁下执行了此操作且问题没有解决);
  2. HelloWorld是否正常(登录状态新建默认项目,执行复现步骤):正常/不正常
  3. 注意:如果你的问题是编译器错误,那么请提供可复现的demo,否则会被直接关闭。

问题描述 manjaro kde下安装报错

问题复现 报错内容如下

正在连接 github.com (github.com)|20.205.243.166|:443... 已连接。已发出 HTTP 请求,正在等待回应... 302 Found
位置:https://objects.githubusercontent.com/github-production-release-asset-2e65be/194786020/4db45a00-1ab5-11eb-8f70-04dc0aa3d480?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231001%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231001T073031Z&X-Amz-Expires=300&X-Amz-Signature=2294bd8a7f2e8e99884b5da1f74d2a6357d46cdd66dc7e63d4feb155126077a4&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=194786020&response-content-disposition=attachment%3B%20filename%3Dripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz&response-content-type=application%2Foctet-stream [跟随至新的 URL]
--2023-10-01 15:30:31--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/194786020/4db45a00-1ab5-11eb-8f70-04dc0aa3d480?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231001%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231001T073031Z&X-Amz-Expires=300&X-Amz-Signature=2294bd8a7f2e8e99884b5da1f74d2a6357d46cdd66dc7e63d4feb155126077a4&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=194786020&response-content-disposition=attachment%3B%20filename%3Dripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz&response-content-type=application%2Foctet-stream
正在解析主机 objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
正在连接 objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... 已连接。已发出 HTTP 请求,正在等待回应... 200 OK
长度:2142947 (2.0M) [application/octet-stream]
正在保存至: “/home/imic/.cache/yay/wechat-devtools/src/cache/ripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz.tmp”

/home/imic/.cache/yay/wechat-devtools/ 100%[==========================================================================>]   2.04M  10.5KB/s  用时 4m 22s  

2023-10-01 15:34:56 (7.99 KB/s) - 已保存 “/home/imic/.cache/yay/wechat-devtools/src/cache/ripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz.tmp” [2142947/2142947])

rg
 install modules  
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.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated spdlog@0.11.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! code 1
npm ERR! path /home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit
npm ERR! command failed
npm ERR! command sh -c node lifecycleScripts/preinstall && node lifecycleScripts/install
npm ERR! [nodegit] Running pre-install script
npm ERR! [nodegit] Running install script
npm ERR! Failed to execute '/home/imic/.cache/yay/wechat-devtools/src/node/bin/node /home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp
npm ERR! info it worked if it ends with ok
npm ERR! node-pre-gyp
npm ERR! info using node-pre-gyp@0.13.0
npm ERR! node-pre-gyp info using node@16.4.2 | linux | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! 
npm ERR! node-pre-gyp
npm ERR! info check checked for "/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/Release/nodegit.node" (not found)
npm ERR! node-pre-gyp
npm ERR! http GET https://npmmirror.com/mirrors/nodegit/v0.27.0/nodegit-v0.27.0-node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp
npm ERR! http 404 https://npmmirror.com/mirrors/nodegit/v0.27.0/nodegit-v0.27.0-node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp
npm ERR! WARN Tried to download(404): https://npmmirror.com/mirrors/nodegit/v0.27.0/nodegit-v0.27.0-node-v93-linux-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for nodegit@0.27.0 and node@16.4.2 (node-v93 ABI, glibc) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp
npm ERR! http 404 status code downloading tarball https://npmmirror.com/mirrors/nodegit/v0.27.0/nodegit-v0.27.0-node-v93-linux-x64.tar.gz
npm ERR! gyp
npm ERR! 
npm ERR! info it worked if it ends with ok
npm ERR! gyp
npm ERR! info using node-gyp@7.1.2
npm ERR! gyp
npm ERR! info using node@16.4.2 | linux | x64
npm ERR! gyp info ok
npm ERR! gyp
npm ERR! info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp
npm ERR! info using node@16.4.2 | linux | x64
npm ERR! gyp info find Python using Python version 3.11.5 found at "/usr/bin/python3"
npm ERR! (node:60482) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp
npm ERR! info spawn /usr/bin/python3
npm ERR! gyp
npm ERR! info spawn args [
npm ERR! gyp info spawn args   '/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp
npm ERR! info spawn args   '/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info
npm ERR! spawn args   '/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/imic/.cache/node-gyp/16.4.2/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/imic/.cache/node-gyp/16.4.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/imic/.cache/node-gyp/16.4.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp
npm ERR! info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info
npm ERR! spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info
npm ERR! spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
npm ERR! sys.exit(gyp.script_main())
npm ERR!              ^^^^^^^^^^^^^^^^^
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
npm ERR!     return main(sys.argv[1:])
npm ERR!            ^^^^^^^^^^^^^^^^^^
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
npm ERR! return gyp_main(args)
npm ERR! ^^^^^^^^^^^^^^
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 629, in gyp_main
npm ERR! [generator, flat_list, targets, data] = Load(
npm ERR! ^^^^^
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 150, in Load
npm ERR! result = gyp.input.Load(
npm ERR!              ^^^^^^^^^^^^^^^
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 3021, in Load
npm ERR! LoadTargetBuildFile(
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 411, in LoadTargetBuildFile
npm ERR! build_file_data = LoadOneBuildFile(
npm ERR! ^^^^^^^^^^^^^^^^^
npm ERR!   File "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 239, in LoadOneBuildFile
npm ERR! build_file_contents = open(build_file_path, "rU").read()
npm ERR! ^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! ValueError: invalid mode: 'rU' while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp
npm ERR! ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack
npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp
npm ERR! ERR! System Linux 6.5.3-1-MANJARO
npm ERR! gyp ERR!
npm ERR! command "/home/imic/.cache/yay/wechat-devtools/src/node/bin/node" "/home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp
npm ERR! ERR! cwd /home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit
npm ERR! gyp ERR! node -v v16.4.2
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp
npm ERR! ERR! build error
npm ERR! node-pre-gyp
npm ERR! ERR! stack Error: Failed to execute '/home/imic/.cache/yay/wechat-devtools/src/node/bin/node /home/imic/.cache/yay/wechat-devtools/src/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack
npm ERR! at ChildProcess.<anonymous> (/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp
npm ERR! ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp
npm ERR! ERR! System Linux 6.5.3-1-MANJARO
npm ERR! node-pre-gyp ERR! command
npm ERR! "/home/imic/.cache/yay/wechat-devtools/src/node/bin/node" "/home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd
npm ERR! /home/imic/.cache/yay/wechat-devtools/src/package.nw/node_modules_tmp/node_modules/nodegit
npm ERR! node-pre-gyp ERR! node -v v16.4.2
npm ERR! node-pre-gyp ERR!
npm ERR! node-pre-gyp -v v0.13.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! 
npm ERR! [nodegit] ERROR - Could not finish install
npm ERR! [nodegit] ERROR - finished with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/imic/.npm/_logs/2023-10-01T07_35_04_733Z-debug.log
==> 错误: 在 build() 中发生一个错误。    正在放弃...
 -> 生成时出错: wechat-devtools-exit status 4
 -> 无法安装以下软件包, 需要手动介入处理:
wechat-devtools - exit status 4

期望的效果

截屏

版本信息 (这是必要的):

代码片段

额外的信息

msojocs commented 11 months ago

aur 不是我在维护

imic07 commented 11 months ago

aur 不是我在维护

好,我去aur提下

smoothdvd commented 11 months ago

@imic07 Because of npmmirror removed the nodegit binary, there is a temporary solution: fallback to python 3.10.x ( using pacman cache or install pyenv). I tested script in python 3.10.13