zoukankan      html  css  js  c++  java
  • 制作Theia扩展报错

    [4/4] Building fresh packages...
    [8/10] ⠠ electron
    [-/10] ⠠ waiting...
    [6/10] ⠠ oniguruma
    [9/10] ⠠ native-keymap
    error /home/theia/theia-hello-world-extension/node_modules/native-keymap: Command failed.
    Exit code: 1
    Command: node-gyp rebuild
    Arguments: 
    Directory: /home/theia/theia-hello-world-extension/node_modules/native-keymap
    Output:
    gyp info it worked if it ends with ok
    gyp info using node-gyp@6.0.1
    gyp info using node@10.18.0 | linux | x64
    gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3"
    gyp info spawn /usr/bin/python3
    gyp info spawn args [ '/home/theia/theia-hello-world-extension/node_modules/electron-rebuild/node_modules/node-gyp/gyp/gyp_main.py',
    gyp info spawn args   'binding.gyp',
    gyp info spawn args   '-f',
    gyp info spawn args   'make',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/theia/theia-hello-world-extension/node_modules/native-keymap/build/config.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/theia/theia-hello-world-extension/node_modules/electron-rebuild/node_modules/node-gyp/addon.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/theia/.cache/node-gyp/10.18.0/include/node/common.gypi',
    gyp info spawn args   '-Dlibrary=shared_library',
    gyp info spawn args   '-Dvisibility=default',
    gyp info spawn args   '-Dnode_root_dir=/home/theia/.cache/node-gyp/10.18.0',
    gyp info spawn args   '-Dnode_gyp_dir=/home/theia/theia-hello-world-extension/node_modules/electron-rebuild/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=/home/theia/.cache/node-gyp/10.18.0/<(target_arch)/node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/home/theia/theia-hello-world-extension/node_modules/native-keymap',
    gyp info spawn args   '-Dnode_engine=v8',
    gyp info spawn args   '--depth=.',
    gyp info spawn args   '--no-parallel',
    gyp info spawn args   '--generator-output',
    gyp info spawn args   'build',
    gyp info spawn args   '-Goutput_dir=.' ]
    Package x11 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `x11.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'x11' found
    Package xkbfile was not found in the pkg-config search path.
    Perhaps you should add the directory containing `xkbfile.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'xkbfile' found
    gyp: Call to 'pkg-config x11 xkbfile --cflags | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
    gyp ERR! configure error 
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (/home/theia/theia-hello-world-extension/node_modules/electron-rebuild/node_modules/node-gyp/lib/configure.js:351:16)
    gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
    gyp ERR! System Linux 3.10.0-693.el7.x86_64
    gyp ERR! command "/home/theia/.nvm/versions/node/v10.18.0/bin/node" "/home/theia/theia-hello-world-extension/node_modules/.bin/node-gyp" "rebuild"
    gyp ERR! cwd /home/theia/theia-hello-world-extension/node_modules/native-keymap

    native-keymap缺少依赖项
    • On Debian-based Linux: sudo apt-get install libx11-dev libxkbfile-dev
    • On Red Hat-based Linux: sudo yum install libx11-devel.x86_64 libxkbfile-devel.x86_64 # or .i686
    • On FreeBSD: sudo pkg install libX11
    [4/4] Building fresh packages...
    [8/10] ⠐ electron
    [-/10] ⠐ waiting...
    [-/10] ⠈ waiting...
    [-/10] ⠈ waiting...
    error /home/theia/theia-hello-world-extension/node_modules/electron: Command failed.
    Exit code: 1
    Command: node install.js
    Arguments: 
    Directory: /home/theia/theia-hello-world-extension/node_modules/electron
    Output:
    Downloading tmp-227060-0-electron-v4.2.12-linux-x64.zip
    Error: read ECONNRESET
    /home/theia/theia-hello-world-extension/node_modules/electron/install.js:49
      throw err
      ^

    可以先在这里下载安装包:https://npm.taobao.org/mirrors/electron/

    然后,将安装包(.zip文件)拷贝到以下路径:

    Linux:$XDG_CACHE_HOME或~/.cache/electron/

    Mac:~/Library/Caches/electron/

    Windows:$LOCALAPPDATA/electron/Cache~/AppData/Local/electron/Cache/

     
  • 相关阅读:
    Nginx 集群 反向代理多个服务器
    Nginx 反向代理
    Nginx 图片服务器
    网鼎杯 pwn 记录
    demo.testfire.net 靶场测试流程记录
    靶场测试系列(已办清单)
    Burp Suite插件推荐
    ida不错的插件记录
    0ctf2017-babyheap
    0ctf2018 pwn
  • 原文地址:https://www.cnblogs.com/haibaraai0913/p/12101730.html
Copyright © 2011-2022 走看看