I installed nvm n and now I keep getting "dyld: bad external relocation length" - command-line

I installed nvm, n, using sudo and decided to test it out by downloading several versions of node on my system. When I tried to switch between the node versions I kept getting "Permissions denied." So I decided to sudo the command for switching between versions too. That's when all hell broke loose. I keep getting
dyld:bad external relocation length
I've tried to reboot my terminal with some hope that it would magically fix itself out. Alas, I was wrong.Thanks in Advance.
Update 1: I've tried to use npm to install yo and it gives me the same "dyld" prompt, along with the following:
Trace/BPT trap: 5
Essentially I can't use npm anymore.

I had the same thing happen.
I was using a mac, so I downloaded the .pkg for the version of node I was interested in and re-installed it (which reinstalls npm at the same time).
Everything was back up and running after that.

I had the same this morning because of n package via npm,
Node was installed via brew (without npm), so i removed it this way;
brew uninstall node
then reinstalled the newer version via n package
n lts
if this is not enough because of policy rules of your mac, try
sudo npm lts
this solved my problem and saved a big time from reinstalling all global node modules.

Just use n reinstall node that you break in.

i solved my problem wihout uninstalling the nodejs,just update the node version by n, and it works.
sudo n latest

Related

How I can open pgadmin4 in fedora 36?

Good evening people, I am trying to install pgadmin4 on fedora 36, I followed all the steps in the documentation and pgadmin4 and its dependencies were installed correctly but I do not know how to start it, or open it and it does not let me configure it on the web because I do not create the directory described in the final step to configure the web version.
I had the same problem. I solved it installing pgadmin4 from linux-pachages
https://linux-packages.com/fedora-36/package/pgadmin4-qtx86-64
I followed the same instructions but mistakenly changing "yum" to "dnf" out of force of habit. I found I got an install out of it which seemed OK at a glance, but it was just documentation and not an executable, and there was no shortcut added to run pgAdmin. Perhaps you might have inadvertently done something similar? After uninstalling, I tried again using "yum" exactly as documented and the latest executable installed without any issue. So the steps to install that would work for me were as follows. (Desktop version in my case.)
sudo rpm -e pgadmin4-fedora-repo
sudo rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-fedora-repo-2-1.noarch.rpm
sudo yum install pgadmin4-desktop
The QT workaround also mentioned as an answer worked for me, but I wanted to avoid that since it is an earlier release (6.9) than the current 6.11, isn't officially supported and fires a warning about that every time on start up saying some functionality may be missing, which is not good for clients to see potentially in my case.
Same problem - couldn't open it after installing. You have to install pgadmin4-desktop not pgadmin4.

ERROR: gcloud crashed (ModuleNotFoundError): No module named 'distutils.spawn'

I have been deploying my service on App Engine for a long time now and never had an issue until today.
Command to Deploy
gcloud app deploy app.yaml
Output
Beginning deployment of service [default]...
Building and pushing image for service [default]
ERROR: gcloud crashed (ModuleNotFoundError): No module named 'distutils.spawn'
I just deployed this morning with no issues and randomly when I tried to redeploy now I get the above error. Hopefully someone can help figure out what caused this issue.
For info:
app.yaml
runtime: custom
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 4
disk_size_gb: 10
Gcloud version
$ gcloud --version
Google Cloud SDK 341.0.0
alpha 2021.05.14
beta 2021.05.14
bq 2.0.68
core 2021.05.14
gsutil 4.62
minikube 1.20.0
skaffold 1.23.0
I had a similar issue, on my case this was the solution:
sudo apt-get install python3-distutils
Same exact problem.
Building and pushing image for service [default]
ERROR: gcloud crashed (ModuleNotFoundError): No module named 'distutils.spawn'
This issue seemed to be in the snap install of google-cloud-sdk in Ubuntu 20.04.2 LTS (You can select it pre-installed during the ISO setup.. DONT)
I was getting this in 18.04 as well
FINALLY solved it..
But.. I had to make sure I did not snap install google-cloud-sdk
I also..
sudo apt update
sudo apt upgrade
Then I made sure the snap install was not installed. (After a fresh install of Ubuntu). Sense I use dockerfiles it's easy for me to zap a dev environment and get it back.
But Id imagine if you can't zap your os and make sure not to let the OS put it's snap install of google-cloud-sdk.. You could snap remove google-cloud-sdk and then hunt for all it's configuration files.. And remove them.
At that point
https://cloud.google.com/sdk/docs/install#deb
Follow that... I did so exactly... FINALLY seemed to work. I used the apt install route they explain.. NOT the snap.
I tried all the pip install sudo apt-get install python3-distutils Till I was blue in the face... NADA.
somehow.. The Snap being present puts PATH settings that use the wrong distutils.
On my box now that I search for it.. In Totally fresh OS state... No Snap install and going through exactly the cloud.google.com/sdk/docs/install#deb work..
Here is distutils everywhere on my box in Ubuntu 20.03.2 LTS
$ sudo find / -name distutils
/snap/lxd/19188/lib/python2.7/distutils
/snap/core18/1944/usr/lib/python3.6/distutils
/snap/core18/1944/usr/lib/python3.7/distutils
/snap/core18/1944/usr/lib/python3.8/distutils
/usr/lib/python3.8/distutils
/usr/lib/python3.9/distutils
/usr/lib/python2.7/distutils
Note.. There's no google-cloud-sdk in the snap!!
The gcloud app deploy FINALLY works!! Passes the part where it starts to deploy.
But as the others in this.. It happened completly random.
All I can guess is...... Something clobered distutils as an update somewhere and started pointing to a garbage path.
Make sure you search for distutils find out where it is.. what's referencing it.. Somewhere in that mess you can fix it.
One thing I was able to discover is this problem will come default from 20.04.2.
I downloaded the most recent iso.. thinking it was an 18.04 issue.
Installed it fresh into Virtual Box.. And got exactly this same issue. So my solution fix (no SNAP).. Is against a totally clean 20.04.2 brand spanking new Ubuntu LTS VM. Default everything.
===============
Regarding the random one day it worked.. the next it didn't...
Here's the thing about snaps in Ubuntu:
https://www.google.com/search?q=Do+snap+packages+update+automatically%3F&rlz=1C1CHBF_enUS834US834&ei=ygynYJGRIo3f-gSLzb3YDg&oq=Do+snap+packages+update+automatically%3F&gs_lcp=Cgdnd3Mtd2l6EAMyCAghEBYQHRAeUJ-TCVifkwlgj5kJaABwAXgAgAFziAHVAZIBAzEuMZgBAKABAqABAaoBB2d3cy13aXrAAQE&sclient=gws-wiz&ved=0ahUKEwiRnrfXz9nwAhWNr54KHYtmD-sQ4dUDCA4&uact=5
"Do snap packages update automatically?
Snaps update automatically, and by default, the snapd daemon checks for updates 4 times a day. Each update check is called a refresh."
so that's how it randomly broke if you used a snap

How can I uninstall all yum packages recently installed (oVirt Node / CentOS Minimal)

I'm setting up oVirt (having no previous experience, so if you have a oVirt Node solution please tell me). When I install the ovirt-engine, it spits out a bunch of errors. I think this is more of an error with centOS/yum than anything. What happened is I ran: yum install ovirt-engine.
oVirt has this weird terminal hang issue, and I let it go for an hour (64gb ram, x5650 so no spec problems) and it was still hung. I reloaded, and now I can't install it. One of the errors is:
Error: Package: json-smart-2.2-5.el7.noarch (ovirt-4.3-centos-ovirt43) Requires: jpackage-utils
and a bunch more like this.
yum install jpackage-utils ovirt-engine

ubuntu 16.04 LTS login loop after updating driver nvidia-396

I have an issue on login to my computer when nvidia-396 is installed. It returns to login screen after giving error message pop up. When I remove the nvidia* and restart lightdm it works fine.
Could you please help me fixing this.
Thanks.
I had the same issue with this driver.
my system is:
Nvidia gtx 1060 (6gb)
AMD Fx 8350
ASUS motherboard
I was using the 390 driver ( 394.48 ), then upgraded to 396 and got this 'lightdm<->nvidia driver' problem.
It seems that mostly users are getting this bug too.
Unfortunately there's no solution yet, the nvidia-396 driver is still in beta according to Nvidia drivers page. Just purge the 396 driver and switch back to an older version, then everything should work fine.
If not, see this askubuntu question and this Nvidia topic (only step 2, 4 and 5 are necessary for you, but yet the whole tutorial may become usefull) , it helped me to get the drivers working again after i messed up badly some files and packages.
This is what i did, no login screen after upgrading the Nvidia driver, it works for me.
login with console Ctrl+Alt+F1
login as root and remove the read-only file system by mounting mount -o remount,rw /
stop lightdm , /ete/init.d/lightdm stop. (if this is in inactive(dead) just copy backup xorg.conf.new file in your root directory and copy file to /ete/X11/xorg.conf and reboot)
then remove old nvidia Drivers, apt-get remove --purge nvidia-*
add the driver repository add-apt-repository ppa:graphics-drivers/ppa
apt-get update
apt-get install nvidia-387
apt-get install ubuntu-desktop
start lightdm /etc/init.d/lightdb start. or reboot.(Finished)
I was able to fix by fully removing nvidia drivers with bumblebee.
sudo apt purge nvidia* bumblebee
And reinstalling
sudo apt install nvidia-396
Problem description
Nvidia-396, which you have installed intently or unawarely auto-installed by other related package, such as swig, can not properly used in ubuntu 16.04.
Solution
The best way to solve the problem would be ever find the miss-operation firstly. To do this, firstly, you need to check your command history by :
vi ~/.bash_history
and then search "sudo" keywords which indicate essential command, and find suspects. In my case, it is
sudo install swig
Finally, revert it by :
sudo apt-get purge swig
CAUTION : PLEASE NEVER DO
sudo apt-get upgrade
It will install newest package of your whole system which will include nivida-396
For me I just deleted the .Xauthority and two more of them having different suffixes from my home folder and it was working again fine!

Remove program that isn't listed in apt-get

I installed the program dolphin-emu on Ubuntu 16.04, but wanted to remove it and install a different version. I tried removing it but I can't see the package when searching for "dolphin" using "sudo apt-get --purge remove ..." or "apt list -installed" (the package should be called dolphin-emu). However I can still run the application from the user interface in Unity so it is clearly still installed.
I tried installing the version I want but it does not come up when I try to run it, only the older version that I want to get rid of! I tried to manually remove files and such but I think that made the whole thing worse and now I'm in some kind of mess that I can't resolve...