I was trying to upgrade Node by following the instruction from https://tecadmin.net/upgrade-nodejs-via-npm/. I did sudo npm cache clean -f
, sudo npm install -g n
, and sudo n stable
.
After the above commands, I stupidly did sudo ln -sf /usr/local/n/versions/node/11.8.0/bin/node /usr/bin/node
. After this command, I checked the /usr/local/n/versions/node
folder. It had 10.15.3
, so I typed sudo ln -sf /usr/local/n/versions/node/10.15.3/bin/node /usr/bin/node
.
Right now, node -v
gives me 10.15.3
. However, npm -version
gives me Segmentation fault (core dumped)
. Other commands like npm update -g
also gives me the same error message.
Other posts about the Segmentation fault (core dumped)
error don't seem to be directly related to my problem.
How can I fix this?
I am using Ubuntu 19.04.
Thank you.
However, npm -version gives me Segmentation fault (core dumped). Other commands like npm update -g also gives me the same error message. Other posts about the Segmentation fault (core dumped) error don't seem to be directly related to my problem.
Step 1: Run Ubuntu in startup mode by pressing the Esc key after the restart. Step 3: Run Ubuntu in the recovery mode and you will be listed with many options. So, we have two methods of resolving segmentation fault: CLI and the GUI.
Segmentation fault is when your system tries to access a page of memory that doesn’t exist. Core dumped means when a part of code tries to perform read and write operation on a read-only or free location.
Hi Tonima! Firstly, what you have posted is not an error message (about the seed). However, the error of segmentation fault during the energy minimization has to do with your starting configuration and how the bond-constraint algorithm is managing it. Also it can happen that you have a box which might be a bit too small.
I faced The same Issue just now, This because of conflicting the npm of node and nodejs
so remove nodejs by below commands
sudo apt-get remove nodejs
this will remove all nodejs related Packages,
after above command you have to run autoremove command just like that
sudo apt autoremove
this will solve the problem,
Now you just have node pacakge in your machine, and NPM (segmentation dumped) error will also resolves.
you can more dig about What is segmentation fault
Try to run npm rebuild
to recompile your dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With