Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install not working properly #20

Closed
nolleto opened this issue Mar 8, 2021 · 8 comments
Closed

Install not working properly #20

nolleto opened this issue Mar 8, 2021 · 8 comments
Labels
wip Work in progress.

Comments

@nolleto
Copy link

nolleto commented Mar 8, 2021

Hello, I'm trying to install yarn by the command:

$ asdf install yarn 1.22.4

And I get the following message:

⛔ Missing one of either of the following dependencies: wget, curl

I also tried install another yarn versions but I still get the same error message.

I'm currently using a Macbook and I have curl installed. I checked it by executing:

curl --version

Hope someone can help me 😄

@canterberry
Copy link
Member

That error message is coming from the following statement in this plugin's install script:

[ -x "$(which wget)" -o -x "$(which curl)" ]

To figure out what's happening, let's break that down into another script for debugging:

#!/usr/bin/env bash

WGET="$(which wget)"
CURL="$(which curl)"

echo "wget: ${WGET}"
echo "curl: ${CURL}"

If you copy/paste that into a new file, chmod +x ... the file (i.e: set its executable flag), then run it, I would expect this issue to be reproduced, showing nothing for either wget or curl.

Can you try that and paste the result here?

I'm also curious what is printed if you run which curl directly on the command-line (vs in the script). May be a PATH issue.

@canterberry canterberry added the wip Work in progress. label Mar 9, 2021
@nolleto
Copy link
Author

nolleto commented Mar 9, 2021

This was the result @canterberry
image

wget: No such command in 14.15.1 of nodejs
curl: No such command in 14.15.1 of nodejs

I installed curl with npm by the command:

npm install --global curl

But I'm still getting the same error
🤔

@nolleto
Copy link
Author

nolleto commented Mar 9, 2021

Let me share with you this:
image

@canterberry
Copy link
Member

canterberry commented Mar 12, 2021

Thanks for sharing! I see two highly suspicious things in the output:

  1. npm install --global curl is not how to install curl. On Mac OS X, curl can be installed via brew install curl. You have installed an errantly named npm package that may or may not be malicious (or at the least, intentionally misleading).

  2. which is a system command that, under no circumstances, should have any awareness of nodejs, much less any specific version of nodejs. It's very suspicious and strange that your output indicates that it trying to find those commands using some kind of path resolver with awareness of nodejs. Are you using any kind of specialized shell or terminal app, maybe? Different terminal apps may do all sorts of interesting things with the session!

I know it may not be helpful to suggest and could seem like overkill, but given what I'm seeing in the CLI output you've shared, it might be better to factory reset and start again from a known common state. Otherwise, we may end up spending a significant amount of time reverse-engineering all the possible things that could have impacted your system's binaries and/or shell environment.

If anyone else has advice to help, please chime in! I'm not as well informed on the variety of environments folks might be using, personally, but we've got a wide community here who may have much more insight to offer. I imagine other tools might be affected by this class of issue as well.

@canterberry
Copy link
Member

Closing this issue as stale.

@FeanorsCurse
Copy link

Just fyi, was facing a similar issue. What helped was running brew install wget curl gpg. Might be useful to add that to the requirements (does indeed not seem to run out of the box, which is fine).

However, even then it's not working - not gonna create a new issue, just gonna install yarn manually, but fyi:

--2024-01-05 10:36:10-- https://classic.yarnpkg.com/downloads/1.22.21/yarn-v1.22.21.tar.gz.asc
Resolving classic.yarnpkg.com (classic.yarnpkg.com)... 2a05:d014:58f:6202::64, 2a05:d014:275:cb02::c8, 35.156.224.161, ...
Connecting to classic.yarnpkg.com (classic.yarnpkg.com)|2a05:d014:58f:6202::64|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-v1.22.21.tar.gz.asc [following]
--2024-01-05 10:36:10-- https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-v1.22.21.tar.gz.asc
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-01-05 10:36:10 ERROR 404: Not Found.

@iPurpl3x
Copy link

@FeanorsCurse I saw the artifacts are missing... I think it will be fixed at some point. Old versions work properly.
image

@canterberry
Copy link
Member

@iPurpl3x See #33 . I reached out to the yarn maintainers about that issue. There's currently no momentum on the yarn side to get that fixed, so a volunteer would need to (a) step up to see that through, and (b) persuade the yarn maintainers to accept the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress.
Development

No branches or pull requests

4 participants