yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.39k stars 2.73k forks source link

Segmentation fault #4954

Open jaumard opened 6 years ago

jaumard commented 6 years ago

What is the current behavior? Just by doing yarn, I get this:

yarn
yarn install v1.1.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[#############################################################################################-] 208/211nodenodenodenode: : : relocation error: noderelocation errorrelocation error: : : : nodenode: relocation error: symbol , version GLIBC_2.4 not defined in file libc.so.6 with link time reference: node
symbol , version GLIBC_2.4 not defined in file libc.so.6 with link time referencesymbol , version GLIBC_2.4 not defined in file libc.so.6 with link time reference: root@minilisa:/var/www/lisa-voice-respeaker2mic# 

After that if I try to do yarn or node -v I get segmentation fault

If the current behavior is a bug, please provide the steps to reproduce. Just clone https://github.com/jaumard/lisa-voice-respeaker2mic and do yarn

What is the expected behavior? Correctly install dependencies

Please mention your node.js, yarn and operating system version. Node: v6.11.3 yarn : v1.1.0 operating system: Raspberry pi zero, raspbian

Daniel15 commented 6 years ago

This looks like an issue with your installation of Node.js rather than an issue with Yarn. Are you sure the version of Node.js you're using is linked against the same glibc version you have installed in libc.so.6?

rally25rs commented 6 years ago

Since Yarn has no native code, I don't see how this would be a yarn issue. I agree with @Daniel15 that this is probably a Node issue or some corrupted library.

Can we close this issue?

kentongray commented 6 years ago

Just to add my two cents, we were using NPM in our docker environment for years and never had a 139. After switching to Yarn we regularly are getting 139 (in docker environments). We're convinced that there is some sort of problem that Yarn is triggering in Docker environments. Beyond that we can't really figure out what or why.

gervaisb commented 4 years ago

Just for information. I got the same issue with yarn but not with node.

$ yarn -v 
segmentation fault
$ node -v
correct result

But I discovered that the nodebinary was the one provided by another installation (GraalVm in my case). So I updated my PATH to find the correct node before and everything went well.

hnrchrdl commented 1 year ago

I had the same problem after installing a new node version though nvm. The problem was gone after I restarted my macbook.

umairdar12 commented 1 month ago

I had the same problem The problem is related to permission errors—your current user doesn't have the necessary permissions to access the relevant directories.

When you run which yarn, it correctly returns the yarn directory, but trying to execute any yarn command results in zsh: segmentation fault yarn install.

I was able to resolve this by installing nvm, then installing Node.js via nvm, and finally installing yarn globally with the following command: npm install -g yarn OR you can install simply by using sudo but that has to be used each and everytime. sudo npm install -g yarn

ByMuath commented 2 days ago

Is the RAM memory cause the issue?