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

Getting an "illegal instruction" error #817

Closed
2 of 6 tasks
ThinkByDesign opened this issue Feb 22, 2024 · 7 comments
Closed
2 of 6 tasks

Getting an "illegal instruction" error #817

ThinkByDesign opened this issue Feb 22, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@ThinkByDesign
Copy link

ThinkByDesign commented Feb 22, 2024

What were you trying to install (or what else went wrong)?

curl -sS https://webi.sh/nerdfont | sh

What exactly did you do?

I ran "curl -sS https://webi.sh/nerdfont | sh" as instructed on this page: https://webinstall.dev/nerdfont/

What went wrong?

Here's the output from the command:

>>> Welcome to Webi! - modern tools, instant installs.  <<<
    We expect your experience to be absolutely perfect!

    Success? Star it!   https://github.com/webinstall/webi-installers
    Problem? Report it: https://github.com/webinstall/webi-installers/issues
                        (your system is Darwin/arm64 with libc & curl)
sh: line 135: 72255 Done                    echo "${my_abs}"
     72256 Illegal instruction: 4  | sed "s:^${my_rel}:~:"

Which OS did you try on?

  • Mac
  • Windows
  • Linux

What type of computer (i.e. laptop, desktop, Raspberry Pi)?

  • Laptop or Desktop (amd64 / x86-64)
  • Raspberry Pi (ARM-64)
  • Other (please specify, if you know)
@ThinkByDesign ThinkByDesign added the bug Something isn't working label Feb 22, 2024
@ThinkByDesign
Copy link
Author

I realized after submitting that this is probably a case where another project is using this project, so I've submitted the bug there. (ryanoasis/nerd-fonts#1522)

@Finii
Copy link

Finii commented Feb 29, 2024

It's the other way around. Nerd Fonts is not using Webinstall - but Webinstall uses Nerd Fonts artifacts.

I would strongly recommend to use one of the officially mentioned Nerd Font installation methods:

https://github.com/ryanoasis/nerd-fonts?tab=readme-ov-file#font-installation

image

@Finii
Copy link

Finii commented Feb 29, 2024

Also ... Webinstall installs a very old version of the font... Currently Nerd Fonts in on v3.1.1, and see here:

image

They do it on purpose, according to the commit message but do not document it anywhere.
Also no reason is given. ¯\_(ツ)_/¯

@HacDan
Copy link
Collaborator

HacDan commented Feb 29, 2024

Looks like NerdFonts was pinned at v2.3.3 in response to some repo restructuring around the time that v3.0.1 of NerdFonts came out. This is referenced in issue #606. From what I can tell, this was put in place as a stop gap and not revisited. At least that's how the issue and subsequent PR reads. I was not apart of said discussion, however, so I may be off base. @coolaj86 may be able to shed more light on the subject.

This installer should probably be revisited to make sure we're installing the latest release of NerdFonts.

As for the issue at hand, I'm not able to reproduce on Linux or MacOS Sonoma in ZSH. What shell are you using @ThinkByDesign?

Something to try, however, would be to run

webi webi

to make sure you have the latest version of webi installed, in case you had an older version from a previous webi install.

@coolaj86
Copy link
Member

coolaj86 commented May 16, 2024

We have two independent issues here:

  • sed illegal instruction
  • NerdFont installer is old

sed Illegal Instruction

@ThinkByDesign Seeing that sed has illegal instructions makes me think that you're using brew, and that something installed sed, and that a recent upgrade didn't go well.

command -v sed

macOS sed is located here:

/usr/bin/sed

macOS sed is POSIX-only, and doesn't even have a version:

sed -V
sed: illegal option -- V
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]

To fix that I'd recommend that you install brew conflict-free: https://webinstall.dev/brew

Brew has official instructions for how to install conflict-free, but they don't do it by default - ostensibly because they can't generically "bottle" up many of the C libs and apps, so it makes the install process slower for old code that relies on hard-coded paths (though I don't think I've ever had any issues directly related to conflict-free installs). The webi brew installer automates those instructions.

NerdFont installer installs an old version

I would accept a PR for a fix for this, but I don't think I'll have the time to invest in it otherwise.

If you don't care about installing NerdFont in an automated fashion, then doing the download and figuring out the right path and such to put it in is going to be the best bet.

If you do want to be able to install it in an automated fashion, I'd be willing to help to get it on Webi, but I myself only use it to get some folder icons and whatnot with lsd.

@coolaj86
Copy link
Member

coolaj86 commented May 16, 2024

I'm going to close this out since I believe it's related to a system tool that's broken the default macOS installation, and not anything to do with Webi (nor anything that Webi can fix or advise on in an automated fashion).

However, we can reopen this if that turns out not to be the case.

@Finii
Copy link

Finii commented May 17, 2024

Just to mention, this does not look like a typical Apple-sed versus normal-sed problem

     72256 Illegal instruction: 4  | sed "s:^${my_rel}:~:"

s/^xxx/~/ is a perfectly valid sed instruction for all seds. The contents of my_rel must be strange (contain characters that mess up the sed command).

I assume my_rel and my_abs contain some paths fro the user setup. Probably the path in this concrete situation contains some regex control characters and there is no code to fortify the assembled sed command (obviously, because the env var is used directly).
On the other hand I can not imagine any contents of my_rel that would cause the encountered error message. And that error message does not seem to be a sed error message. ... Is 4 the exit code or the sed call? Who knows.

image

IO error? Points again to some peculiarity of the user setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants