在 Ubuntu 上构建 vscode 时找不到包“xkbfile" [英] No package 'xkbfile' found when build vscode on Ubuntu
问题描述
我正在 Ubuntu 18.04.2 LTS 上从源代码构建 VS Code.运行时
I'm building VS Code from source on Ubuntu 18.04.2 LTS. While running
yarn run watch
按照 https://github.com 上的说明/Microsoft/vscode/wiki/How-to-Contribute#build-and-run 并出现以下错误.
as instructed on https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run and got following error.
Error: Cannot find module 'gulp-watch'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/title/workspace/vscode/build/lib/watch/index.js:23:68)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
error Command failed with exit code 1.
因此,我尝试通过执行 yarn add gulp-watch --no-save
来安装 gulp-watch 并出现以下错误
So, I tried to install gulp-watch by executing yarn add gulp-watch --no-save
and got following error
error /home/title/workspace/vscode/node_modules/native-keymap: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/title/workspace/vscode/node_modules/native-keymap
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.10.0 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/share/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/title/workspace/vscode/node_modules/native-keymap/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/share/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/title/.node-gyp/iojs-3.1.8/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/title/.node-gyp/iojs-3.1.8',
gyp info spawn args '-Dnode_gyp_dir=/usr/share/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/title/.node-gyp/iojs-3.1.8/<(target_arch)/iojs.lib',
gyp info spawn args '-Dmodule_root_dir=/home/title/workspace/vscode/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 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 --libs' returned exit status 1 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 (/usr/share/node-gyp/lib/configure.js:340:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-47-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/title/workspace/vscode/node_modules/native-keymap
我感兴趣的是No package 'xkbfile' found
消息,但没有发现与 xkbfile 有太多关系.
What interested me is No package 'xkbfile' found
message, but didn't find much related to xkbfile.
我如何通过这个?
谢谢
推荐答案
根据 https://github.com/Microsoft/node-native-keymap,我必须通过执行来安装node-native-keymap的依赖
According to https://github.com/Microsoft/node-native-keymap, I have to install node-native-keymap's dependencies by executing
sudo apt-get install -y g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev libsecret-1-dev
这篇关于在 Ubuntu 上构建 vscode 时找不到包“xkbfile"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!