Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

random_device: rdrand failed #3047

Closed
fk1blow opened this issue Dec 17, 2020 · 11 comments
Closed

random_device: rdrand failed #3047

fk1blow opened this issue Dec 17, 2020 · 11 comments

Comments

@fk1blow
Copy link

fk1blow commented Dec 17, 2020

node version: v10.19.0
os: ubuntu 20.04
npm version: 6.14.8
Node platform: linux
Node process:

  node: '12.20.0',
  v8: '7.8.279.23-node.45',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.16.1',
  modules: '72',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  http_parser: '2.9.3',
  openssl: '1.1.1g',
  cldr: '37.0',
  icu: '67.1',
  tz: '2019c',
  unicode: '13.0'
}

Node architecture: x64

npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

got this when doing a npm i which requires "node-sass": "^4.12.0"

@mbaumanndev

This comment has been minimized.

@fk1blow
Copy link
Author

fk1blow commented Dec 17, 2020

npm i
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Please update to v 2.2.x

> [email protected] install /home/dragos/Downloads/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/linux-x64-64_binding.node
Download complete  ] - :
Binary saved to /home/dragos/Downloads/node-sass/vendor/linux-x64-64/binding.node
Caching binary to /home/dragos/.npm/node-sass/5.0.0/linux-x64-64_binding.node

> [email protected] postinstall /home/dragos/Downloads/node-sass
> node scripts/build.js

Binary found at /home/dragos/Downloads/node-sass/vendor/linux-x64-64/binding.node
Testing binary
terminate called after throwing an instance of 'std::runtime_error'
  what():  random_device: rdrand failed
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dragos/.npm/_logs/2020-12-17T11_16_23_002Z-debug.log

thing is i ve used it successfully on 2 other machines, both running ubuntu 20.04, the only difference being that those were intel machines, as opposed to this one which is and amd ryzen 7 with b550 chipset; could it be an issues with the linux drivers for this kind of setup?

@xzyfer

This comment has been minimized.

@mbaumanndev

This comment has been minimized.

@xzyfer
Copy link
Contributor

xzyfer commented Dec 17, 2020

@fk1blow looks an incompatibility between the system libraries the binaries are compiled with and those on your local machine. Could be something about the architecture of that machine or an ABI mismatch.

Unfortunately there isn't much we can do. Out of curiosity does node-sass@^4 install without issue?

@xzyfer

This comment has been minimized.

@fk1blow
Copy link
Author

fk1blow commented Dec 17, 2020

@xzyfer tried it and it fails in the same way.
Will migrate to dart-sass for now.
Could it work inside a docker container? Anyway, will try it tonight.

Thanks for your help!

@xzyfer
Copy link
Contributor

xzyfer commented Dec 17, 2020

@fk1blow can't say for sure sorry

@nschonni nschonni changed the title fails at postinstall script random_device: rdrand failed Dec 17, 2020
@saper
Copy link
Member

saper commented Apr 10, 2021

It is unlikely node-sass can do anything to make it work :(

@saper saper closed this as completed Apr 10, 2021
@benbucksch
Copy link

Probably caused by sass/libsass#3151

@fluff
Copy link

fluff commented Aug 31, 2021

For what it's worth, I experienced this "RDRAND failed" error after upgrading from Debian10 to Debian11 when running "yarn add node-sass" in an empty directory. (Apparently Debian11 brings a newer libstdc++ which perhaps has a newer implementation of the C++ std::random_device class that started using RDRAND?)

I resolved the issue by upgrading the BIOS. (CPU: AMD Ryzen 7 5800X, Motherboard: GIGABYTE B550I AORUS PRO AX. Original BIOS was version "F3" which triggered the RDRAND errors, updating to BIOS version "F13" resolved the issue.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants