# Node-red-contrib-socketcan 1.0.11 installation failed

**URL:** <https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929>\
**Category:** Hardware\
**Created:** [20 March 2021 15:02 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929 "2021-03-20T15:02:49Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 11:02 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/21 "2021-03-27T11:02:51Z")

</div>

If you follow the link to the node's github repository you will find that it is a dead link, so presumably the node is no longer supported, which is not a good start.

I don't know why it won't install though. Whether it is worth investigating for a dead contrib node I don't know.

---

<div class="post-metadata">

**Author:** ![roadrunner250](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@roadrunner250](https://discourse.nodered.org/u/roadrunner250)\
**Post date:** [27 March 2021 11:31 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/22 "2021-03-27T11:31:29Z")

</div>

Not fixed on a special node, only need a node to read CanBus data from our PLC.  
(canbus utils already working)

I have tried another node:

```auto
-----------------------------------------------------------
2021-03-27T11:14:55.300Z installieren : node-red-contrib-can 1.1.2

2021-03-27T11:14:55.797Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-can@1.1.2
2021-03-27T11:15:34.827Z [out] 
2021-03-27T11:15:34.827Z [out] > socketcan@2.8.0 install /.node-red/node_modules/socketcan
2021-03-27T11:15:34.827Z [out] > node-gyp rebuild
2021-03-27T11:15:34.827Z [out] 
2021-03-27T11:15:45.943Z [err] gyp
2021-03-27T11:15:45.949Z [err]  
2021-03-27T11:15:45.951Z [err] ERR!
2021-03-27T11:15:45.953Z [err]  
2021-03-27T11:15:45.955Z [err] configure error
2021-03-27T11:15:45.957Z [err]  
2021-03-27T11:15:45.971Z [err] gyp
2021-03-27T11:15:45.973Z [err]  
2021-03-27T11:15:45.975Z [err] ERR!
2021-03-27T11:15:45.977Z [err]  
2021-03-27T11:15:45.985Z [err] stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
2021-03-27T11:15:45.985Z [err] gyp ERR! stack File "<string>", line 1
2021-03-27T11:15:45.985Z [err] gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
2021-03-27T11:15:45.985Z [err] gyp ERR!
2021-03-27T11:15:46.015Z [err]  
2021-03-27T11:15:46.017Z [err] stack
2021-03-27T11:15:46.025Z [err] ^
2021-03-27T11:15:46.025Z [err] gyp ERR! stack SyntaxError: invalid syntax
2021-03-27T11:15:46.025Z [err] gyp ERR! stack 
2021-03-27T11:15:46.025Z [err] gyp ERR! stack at ChildProcess.exithandler (child_process.js:281:12)
2021-03-27T11:15:46.025Z [err] gyp ERR! 
2021-03-27T11:15:46.026Z [err] stack
2021-03-27T11:15:46.028Z [err] at emitTwo (events.js:126:13)
2021-03-27T11:15:46.030Z [err] gyp
2021-03-27T11:15:46.031Z [err]  
2021-03-27T11:15:46.045Z [err] ERR! stack at ChildProcess.emit (events.js:214:7)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:336:11)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack at emitOne (events.js:116:13)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack at Socket.emit (events.js:211:7)
2021-03-27T11:15:46.045Z [err] gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:561:12)
2021-03-27T11:15:46.045Z [err] gyp
2021-03-27T11:15:46.047Z [err]  
2021-03-27T11:15:46.048Z [err] ERR!
2021-03-27T11:15:46.050Z [err]  
2021-03-27T11:15:46.052Z [err] System
2021-03-27T11:15:46.065Z [err] Linux 4.14.195
2021-03-27T11:15:46.065Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-03-27T11:15:46.065Z [err] gyp ERR! cwd /.node-red/node_modules/socketcan
2021-03-27T11:15:46.065Z [err] gyp ERR! node -v v8.16.1
2021-03-27T11:15:46.065Z [err] gyp ERR! node-gyp -v v3.8.0
2021-03-27T11:15:46.065Z [err] gyp ERR! not ok 
2021-03-27T11:15:46.977Z [err] npm
2021-03-27T11:15:46.980Z [err]  
2021-03-27T11:15:46.982Z [err] ERR!
2021-03-27T11:15:46.983Z [err]  
2021-03-27T11:15:46.995Z [err] code ELIFECYCLE
2021-03-27T11:15:46.995Z [err] npm ERR! errno 1
2021-03-27T11:15:47.007Z [err] npm
2021-03-27T11:15:47.009Z [err]  
2021-03-27T11:15:47.010Z [err] ERR!
2021-03-27T11:15:47.013Z [err] socketcan@2.8.0 install: `node-gyp rebuild`
2021-03-27T11:15:47.025Z [err] npm ERR! Exit status 1
2021-03-27T11:15:47.025Z [err] npm ERR! 
2021-03-27T11:15:47.025Z [err] npm ERR! Failed at the socketcan@2.8.0 install script.
2021-03-27T11:15:47.025Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-03-27T11:15:47.092Z [err] 
2021-03-27T11:15:47.095Z [err] npm
2021-03-27T11:15:47.097Z [err]  
2021-03-27T11:15:47.098Z [err] ERR!
2021-03-27T11:15:47.105Z [err] A complete log of this run can be found in:
2021-03-27T11:15:47.105Z [err] npm ERR! /.npm/_logs/2021-03-27T11_15_47_056Z-debug.log
2021-03-27T11:15:47.143Z rc=1

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 11:36 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/23 "2021-03-27T11:36:47Z")

</div>

I don't know python, but is that complaining because you have python3 rather then 2? Just a guess though on my part.

---

<div class="post-metadata">

**Author:** ![roadrunner250](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@roadrunner250](https://discourse.nodered.org/u/roadrunner250)\
**Post date:** [27 March 2021 11:48 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/24 "2021-03-27T11:48:06Z")

</div>

Maybe, yes. But I will not downgrade my python now to get nodes for canbus socket running.  
It was a try, so I will go back to python script to read the canbus data and send it to MQTT broker.  
I thought it was a good start to get familiar with nodes.

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [27 March 2021 13:27 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/25 "2021-03-27T13:27:15Z")

</div>

Did you follow the proper setup instructions for node-gyp?

> **[nodejs/node-gyp](https://github.com/nodejs/node-gyp)**
>
> Node.js native addon build tool. Contribute to nodejs/node-gyp development by creating an account on GitHub.

Gyp did only support Python 2 for a long time, but that seems to have changed with recent versions.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 March 2021 13:34 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/26 "2021-03-27T13:34:18Z")

</div>

> [@roadrunner250](#):
>
> I will go back to python script to read the canbus data and send it to MQTT broker

If you already have a working script then that sounds a good way to go. Then you are not reliant on a contrib node.

---

<div class="post-metadata">

**Author:** ![roadrunner250](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@roadrunner250](https://discourse.nodered.org/u/roadrunner250)\
**Post date:** [27 March 2021 14:34 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/27 "2021-03-27T14:34:59Z")

</div>

> [@Colin](#):
>
> If you already have a working script

In principal yes, I can already read values from Canbus (socketcan) by python script.

---

<div class="post-metadata">

**Author:** ![roadrunner250](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@roadrunner250](https://discourse.nodered.org/u/roadrunner250)\
**Post date:** [28 March 2021 18:21 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/28 "2021-03-28T18:21:15Z")

</div>

I have finished the communication with py, no node red for the moment.  
Will give a try on node red next.  
thanks kuema and colin for support !  
You can close the thread

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 May 2021 18:21 UTC](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929/29 "2021-05-27T18:21:43Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/node-red-contrib-socketcan-1-0-11-installation-failed/42929.md?page=1)
