Trying to build atom on ubuntu


#1

I am trying with the command | script/build |. I get the following error on the console.

Node: v0.10.25
npm: v2.5.1
Installing build modules…
Installing apm…
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “usr/bin/python2”, you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:103:14)
gyp ERR! stack at /home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:42:11
gyp ERR! stack at F (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:38:25)
gyp ERR! stack at E (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:41:29)
gyp ERR! stack at /home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:52:16
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Linux 3.13.0-46-generic
gyp ERR! command “node” “/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /home/vishnu/foss/github/atom/apm/node_modules/atom-package-manager/node_modules/first-mate/node_modules/oniguruma
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “usr/bin/python2”, you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:103:14)
gyp ERR! stack at /home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:42:11
gyp ERR! stack at F (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:38:25)
gyp ERR! stack at E (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:41:29)
gyp ERR! stack at /home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:52:16
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Linux 3.13.0-46-generic
gyp ERR! command “node” “/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /home/vishnu/foss/github/atom/apm/node_modules/atom-package-manager/node_modules/keytar
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “usr/bin/python2”, you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:103:14)
gyp ERR! stack at /home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:42:11
gyp ERR! stack at F (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:38:25)
gyp ERR! stack at E (/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:41:29)
gyp ERR! stack at /home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/which/which.js:52:16
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Linux 3.13.0-46-generic
gyp ERR! command “node” “/home/vishnu/foss/github/atom/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /home/vishnu/foss/github/atom/apm/node_modules/atom-package-manager/node_modules/git-utils
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 3.13.0-46-generic
npm ERR! argv “node” “/home/vishnu/foss/github/atom/build/node_modules/.bin/npm” “–userconfig=/home/vishnu/foss/github/atom/.npmrc” “–target=0.10.35” “install” “–loglevel” "error"
npm ERR! node v0.10.25
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! keytar@2.1.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keytar@2.1.0 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the keytar 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 keytar
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/vishnu/foss/github/atom/apm/npm-debug.log

Please help me with how I can set env varible’s exactly.

Thank you.


#2

Please specify the version of Ubuntu. I think it’s 14.04 thought, in that case you simple need the Python 2 installed (ubuntu has v3 on the repos). To do this run the following commands from your terminal

sudo apt-get update
sudo apt-get install python2.7

And you should be good to go


#3

Yeah, I am using ubuntu linux 64bit. But I already have python2 installed in my system. I think the error is due to

gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “usr/bin/python2”, you can set the PYTHON env variable.

I tried setting env variable but I couldn’t succeed.


#4

This path is the default installation path, you don’t need to set environment variable. Are you sure you typed python2.7 in the terminal? Try navigating to this directory and find the folder.


#5

yeah, I installed python2,7 after you told me. I am following this:

https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md#requirements.

I think I should change the command
| npm config set python /usr/bin/python2 -g |

to

| npm config set python /usr/bin/python2.7 -g | ?


#6

Yes you can try that, oh the default directory is 2.7 instead of 2 ? Weird.


#7

But after I try that, it’s not moving further from here

Node: v0.10.25
npm: v2.5.1
Installing build modules…
Installing apm…


#8

Everything went fine now :smile: