วันศุกร์ที่ 16 พฤษภาคม พ.ศ. 2557

Atom : ปัญหาการ install package term แล้ว '/usr/include/util.h' file not found

Standard
     หลังจากใช้ Atom มาซักพักรู้สึกว่าสะดวกดี เลยอยากลองหา Package เพื่อช่วยอำนวยความสะดวกมาใช้ ก็เจอตัวนึงชื่อ term ซึ่งตัวนี้คือการใช้งาน Terminal ผ่านทาง Atom การวิธีใช้งานทำได้โดยไปที่เมนู Packages > term ซึ่งปัจจุบัน terminal สามารถจะอยู่ข้างขวา ซึ่งวิธิติดตั้งก็แต่ serach ใน package manager ชื่อ 'term' หรือใช้คำสั่ง apm install term ใน command line





Error : '/usr/include/util.h' file not found

  • เครื่อง จะต้องลง xcode และ ติดตั้ง command line tools ด้วยคำสั่ง
  • $xcode-select --install
  • จากนั้นลง package node-gyp
  • sudo npm update -g node-gyp

ซึ่ง Error ที่พบเป็นแบบนี้ครับ
../src/unix/pty.cc:37:10: fatal error: '/usr/include/util.h' file not found
#include </usr/include/util.h>
         ^
1 error generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.1.0
gyp ERR! command "node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/gb/1l4rz2f94rg0rjk09tv8m4jc0000gn/T/apm-install-dir-114416-2837-1icb9dk/node_modules/term/node_modules/pty.js
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! pty.js@0.2.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pty.js@0.2.4 install script.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pty.js
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--userconfig" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/.apmrc" "install" "/Users/MaIII/.atom/.node-gyp/.atom/.apm/term/0.2.2/package.tgz" "--target=0.11.10" "--arch=x64"
npm ERR! cwd /private/var/folders/gb/1l4rz2f94rg0rjk09tv8m4jc0000gn/T/apm-install-dir-114416-2837-1icb9dk
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/gb/1l4rz2f94rg0rjk09tv8m4jc0000gn/T/apm-install-dir-114416-2837-1icb9dk/npm-debug.log
npm ERR! not ok code 0




0 ความคิดเห็น:

แสดงความคิดเห็น