Problems with Installing an official binary Elvish

What happens

I was trying to install Elvish using a virtual machine and Ubuntu 20.04. After following every steps mentioned in the official documentation Get Elvish it doesn’t seem to work for me. When executing just a file with " + 1 2" on terminal like “elvish test.elv” there’s an error "segmentation fault (“core dumped”). Then I tried to install elvish using “sudo apt install elvish” but the problem with that is its version 13 and for no reason it’s not possible to use math and str libraries, the error message is “cannot load math: /home/karen/.elvish/lib/math.elv does not exist” or this one “Exception: variable $str:split~ not found”

What do you understand or find about that problem

I read something about “core dumped” and it’s because the system is trying to capture a bit block which is not existing, This is due to the crashing of binaries of some specific programs. Also the official documentation saids it is recommended to use official prebuilt binaries (Get Elvish) instead.

You make any workaround? What did you do?

I tried to install the binary file after “sudo cp elvish-HEAD /usr/bin/elvish” using ./elvish-HEAD but it doesn’t work.

Evidences

I need help with

Installing Elvish in a proper way to use math and str utilities.

Thank you in advance

All languages packages in our CI are supported by Nix since you will need to make local builds of our pipeline is a good idea to install it.

Once you have installed Nix you can use the following command to install Elvish:

nix-env -iA nixpkgs.elvish

Here you can find other languages in the future

https://search.nixos.org/packages

Let us know if you have other problems

Thank you, I did what you said and I’m really new on this so I don’t know how CI works. I also read the information about Local Builds on GitLab but I didnt´t get it. Could you please send me more information about how to run this language using Nix? I would really appreciate it.

After installing Nix and execute the command that I give you to install Elvish you should be able to run Elvish in a normal way.

elvish #If you write this in your command prompt
~> # you should get this

Run files and other features must be work without problems too

If this is not like that maybe you got a problem with your previous try to installations, you will not need knowledge about CI until here.

Thank you so much for your help, now it’s working ok :slight_smile:

1 Like