快轉到主要內容

FEDORA安装electron-builder报错make:g++:命令未找到之解决

354 字1 分鐘00
作者Y Cheung
目錄
  • 系统环境: Fedora 24
  • Node v4.5.0
  • NPM v2.15.9

NPM安装electron-builder报错#

 1$npm install electron-builder --save=dev
 2npm WARN package.json [email protected] No repository field.
 3npm WARN package.json [email protected] No README data
 4 
 5> [email protected] install /var/www/html/test/node_modules/dev/node_modules/inotify
 6> node-gyp rebuild
 7
 8make: Entering directory '/var/www/html/test/node_modules/dev/node_modules/inotify/build'
 9  CXX(target) Release/obj.target/inotify/src/bindings.o
10make: g++:命令未找到
11inotify.target.mk:97: recipe for target 'Release/obj.target/inotify/src/bindings.o' failed
12make: *** [Release/obj.target/inotify/src/bindings.o] Error 127
13make: Leaving directory '/var/www/html/test/node_modules/dev/node_modules/inotify/build'
14gyp ERR! build error 
15gyp ERR! stack Error: `make` failed with exit code: 2
16gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:276:23)
17gyp ERR! stack     at emitTwo (events.js:87:13)
18gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
19gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
20gyp ERR! System Linux 4.7.4-200.fc24.x86_64
21gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
22gyp ERR! cwd /var/www/html/test/node_modules/dev/node_modules/inotify
23gyp ERR! node -v v4.5.0
24gyp ERR! node-gyp -v v3.4.0
25gyp ERR! not ok 
26npm WARN optional dep failed, continuing [email protected]
27npm WARN deprecated [email protected]: This package is deprecated. Use Object.assign.
28npm WARN optional dep failed, continuing [email protected]
29npm WARN optional dep failed, continuing [email protected]
30npm ERR! Linux 4.7.4-200.fc24.x86_64
31npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "electron-builder" "--save=dev"
32npm ERR! node v4.5.0
33npm ERR! npm  v2.15.9
34npm ERR! code ELIFECYCLE
35
36npm ERR! [email protected] install: `node-gyp rebuild`
37npm ERR! Exit status 1
38npm ERR! 
39npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
40npm ERR! This is most likely a problem with the inotify package,
41npm ERR! not with npm itself.
42npm ERR! Tell the author that this fails on your system:
43npm ERR!     node-gyp rebuild
44npm ERR! You can get information on how to open an issue for this project with:
45npm ERR!     npm bugs inotify
46npm ERR! Or if that isn't available, you can get their info via:
47npm ERR! 
48npm ERR!     npm owner ls inotify
49npm ERR! There is likely additional logging output above.
50
51npm ERR! Please include the following file with any support request:
52npm ERR!     /var/www/html/test/npm-debug.log

解决方法:#

安装G++ $sudo dnf install gcc-c++

分享

相關文章

Aliyun MySQL Aborting

作者 Y Cheung331 字1 分鐘00

放了wordpress的主機最近經常掛掉,提示無法連結數據庫,檢查log信息發現是因為內存不足,把InnoDB的buffer pool size改小後似乎好了一些,可今天還是出錯了 …

ubuntu vps上的文件权限配置

作者 Y Cheung238 字1 分鐘00

设置目录内所有文件及文件夹(包括子文件夹内)的权限为-rw-r–r–(644): chmod -R 644 * 设置目录内所有文件(不包括子文件夹内)的权限为 …

修復a2ensite 報錯 Site does not exist

作者 Y Cheung208 字1 分鐘00

給ubuntu主機配置一個子域名的時候,發現用 a2ensite 居然報錯了!明明看了好些教程,比如這個,這個,都是講的差不多的東西,我都完全照著做,怎麼我一運行這個命令就報錯 …

忘記 Mysql ROOT 密碼的解決辦法

作者 Y Cheung174 字1 分鐘00

豬腦袋是記不住密碼的。 靠別人也是記不住密碼的。 環境 Ubuntu 操作步驟 修改MySQL配置 在 /etc/my.cnf 中的 [mysqld]段尾處加入以下語句:

↑