Closed engineertdog closed 5 years ago
That looks like the contents of the npm log file. Unfortunately this file doesn't include the information printed on the screen when npm install onoff
in called. Can you post the information printed to the screen when npm install onoff
is called please.
ubuntu@ubuntu:~/pilets$ npm install onoff
epoll@2.0.9 install /home/ubuntu/pilets/node_modules/epoll node-gyp rebuild
gyp ERR! build error gyp ERR! stack Error: not found: make gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/w hich/which.js:13:12) gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:6 8:19) gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:8 0:29) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:1 6 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21) gyp ERR! System Linux 4.15.0-1040-raspi2 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gy p/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/ubuntu/pilets/node_modules/epoll gyp ERR! node -v v10.16.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN pilets@1.0.0 No description npm WARN pilets@1.0.0 No repository field.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! epoll@2.0.9 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the epoll@2.0.9 install script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2019-07-05T15_58_46_668Z-debug.log
It looks like the tools that are needed for building C/C++ code have not been installed yet. Run the following command and then try to install onoff again:
sudo apt-get install build-essential
I'm sorry, I had just noticed that I somehow came to this repo instead of the official onoff repo itself, even though I had used the npm page. That did the trick, but I'm curious as to why this was not previously installed? I could see that being an issue for a fresh Ubuntu 18.04 Server, where it's a little more lightweight for the PI. However, even my full Ubuntu 18.04 AWS EC2 instance could not install onoff either, and I had to install build-essential
as well.
I'm sorry, I had just noticed that I somehow came to this repo instead of the official onoff repo itself, even though I had used the npm page.
No problem.
That did the trick
That's good news.
but I'm curious as to why this was not previously installed? I could see that being an issue for a fresh Ubuntu 18.04 Server, where it's a little more lightweight for the PI. However, even my full Ubuntu 18.04 AWS EC2 instance could not install onoff either, and I had to install
build-essential
as well.
The people who create the Ubuntu distributions probably decided that the majority of their users don't need build-essentials
so they didn't include it by default. This sounds reasonable to me. Typically build-essentials
is only needed by users who build software from source. I guess that the majority of Ubuntu users don't do this.
Would it be recommended to include it in the readme / installation somewhere? I don't recall if I had to do this the last time I installed onoff. But, that was also on raspbian and not on Ubuntu.
Would it be recommended to include it in the readme / installation somewhere? I don't recall if I had to do this the last time I installed onoff. But, that was also on raspbian and not on Ubuntu.
I'd prefer not to add information to the readme that the majority of users won't need. Raspbian is the operating system used by most people on the Raspberry Pi. Raspbian comes with build-essentials
installed by default. BeagleBobe.org provides Debian distributions for the BeagleBone. This also comes with build essentials
installed by default. The manufacturers of SBCs typically have developers in focus and will include build-essentials
with their distributions by default.
If the error occurred on Raspbian I would add it to the readme.
I'm running a clean install of Ubuntu 18.04 Server on a raspberry PI with Node v10.16.0 and NPM v6.9.0. As the ubuntu user, I am trying to install onoff, and only onoff, with one npm install command. Attached is the full output from
npm install onoff