nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terminal locked > sh-5.2$ from "wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash"

amo-mkt opened this issue · comments

Operating system and version: Zorin 17

nvm debug output:

< sh-5.2$ nvm debug
sh: nvm: command not found >

nvm ls output:

< sh-5.2$ nvm Is
sh: nvm: command not found >

How did you install nvm?

What steps did you perform?

I am new to all this. I was just trying to install nodejs.

What happened?

My vscode terminal are locked in this "sh-5.2$" and are not working correctly.

What did you expect to happen?

It will be nice to have my terminal working as before, when they show the folders and so on.

Is there anything in any of your profile files that modifies the PATH?

If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?

< sh-5.2$ curl -I --compressed -v https://nodejs.org/dist/

  • Host nodejs.org:443 was resolved.
  • IPv6: 2606:4700:10::6814:172e, 2606:4700:10::6814:162e
  • IPv4: 104.20.23.46, 104.20.22.46
  • Trying [2606:4700:10::6814:172e]:443...
  • Connected to nodejs.org (2606:4700:10::6814:172e) port 443
  • ALPN: curl offers h2,http/1.1
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (IN), TLS handshake, CERT verify (15):
  • TLSv1.3 (IN), TLS handshake, Finished (20):
  • TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
  • TLSv1.3 (OUT), TLS handshake, Finished (20):
  • SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / RSASSA-PSS
  • ALPN: server accepted h2
  • Server certificate:
  • subject: CN=*.nodejs.org
  • start date: Feb 28 00:00:00 2024 GMT
  • expire date: Mar 30 23:59:59 2025 GMT
  • subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
  • issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
  • SSL certificate verify ok.
  • Certificate level 0: Public key type RSA (4096/152 Bits/secBits), signed using sha256WithRSAEncryption
  • Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha384WithRSAEncryption
  • Certificate level 2: Public key type RSA (4096/152 Bits/secBits), signed using sha384WithRSAEncryption
  • using HTTP/2
  • [HTTP/2] [1] OPENED stream for https://nodejs.org/dist/
  • [HTTP/2] [1] [:method: HEAD]
  • [HTTP/2] [1] [:scheme: https]
  • [HTTP/2] [1] [:authority: nodejs.org]
  • [HTTP/2] [1] [:path: /dist/]
  • [HTTP/2] [1] [user-agent: curl/8.5.0-DEV]
  • [HTTP/2] [1] [accept: /]
  • [HTTP/2] [1] [accept-encoding: deflate, gzip]

HEAD /dist/ HTTP/2
Host: nodejs.org
User-Agent: curl/8.5.0-DEV
Accept: /
Accept-Encoding: deflate, gzip

  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • old SSL session ID is stale, removing
    < HTTP/2 200
    HTTP/2 200
    < date: Thu, 07 Mar 2024 22:34:36 GMT
    date: Thu, 07 Mar 2024 22:34:36 GMT
    < content-type: text/html
    content-type: text/html
    < cache-control: public, max-age=3600, s-maxage=14400
    cache-control: public, max-age=3600, s-maxage=14400
    < last-modified: Thu, 07 Mar 2024 19:07:45 GMT
    last-modified: Thu, 07 Mar 2024 19:07:45 GMT
    < cf-cache-status: HIT
    cf-cache-status: HIT
    < vary: Accept-Encoding
    vary: Accept-Encoding
    < strict-transport-security: max-age=31536000; includeSubDomains; preload
    strict-transport-security: max-age=31536000; includeSubDomains; preload
    < x-content-type-options: nosniff
    x-content-type-options: nosniff
    < server: cloudflare
    server: cloudflare
    < cf-ray: 860e0dcb8a599510-JOI
    cf-ray: 860e0dcb8a599510-JOI
    < content-encoding: gzip
    content-encoding: gzip

<

  • Connection #0 to host nodejs.org left intact
    sh-5 2$

I see you're trying to install with wget; what happens if you try to install with curl?

(also, i have no idea what "zorin" is, is it posix compliant?)

Hello! @ljharb

Zorin 17 is a Linux distro.

Actually, my interest is in uninstalling it because I'm having trouble using the terminal.

Before, I had the folders and paths, but now, it just shows "sh-5.2$" and no commands work.

I shared the link from where I got it, through wget and bash, but I don't know how to remove it and would appreciate help with that.

Best regards!

That doesn't make much sense; the install script just adds 2-3 lines to your shell profile.

To remove it, follow the instructions in the readme: https://github.com/nvm-sh/nvm?tab=readme-ov-file#manual-uninstall

altho i'd suggest checking out your shell profile file instead, and trying to get it working :-)

Thank you! @ljharb

However, as you can see in the screenshot, the uninstallation manual commands are not working.

As I mentioned, I'm somewhat new to all of this, and maybe I'm doing something ridiculously simple wrong, but I saw in the "help" that only a few commands are accepted. See below image.

I appreciate the intention to help =]

image
image

ok, so first, make sure there's no $HOME/.nvm dir - delete that if present.

Then, check inside your shell profile file - $HOME/.bashrc, or $HOME/.bash_profile, or $HOME/.profile, perhaps - do you see any lines that mention nvm in them?

@ljharb there are none of them

image

image

Also, I found something interesting when I used the command "exit":

image

image

I'm a bit confused; you do need to know shell basics to be able to use shell programs like nvm, and node.

you can't just type a filename in a shell and hit enter unless it's executable, and files starting with . are often hidden in GUIs, so don't use a GUI.

@ljharb
My intention was to install the current version of Node.js to work with Next.js in the Vercel environment.

When I used Windows, I managed to do it, and everything worked fine.

When I tried on Linux, I couldn't, and then I found a YouTube channel explaining through the command that I put in the title.

Then it installed this damn shell that I can't delete haha

But thanks for the tips; I'll try to understand how to navigate without using the GUI to find these folders. Cheers!

I can't speak to that youtube channel - but installing nvm is just running the install command from the readme; it can't and doesn't install a shell.

I'm going to close this, but good luck figuring it out! Happy to keep helping if you have further questions here.