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

Unable to use :DistantInstall from binary or source #117

Open
alecplotkin opened this issue Aug 1, 2023 · 6 comments
Open

Unable to use :DistantInstall from binary or source #117

alecplotkin opened this issue Aug 1, 2023 · 6 comments

Comments

@alecplotkin
Copy link

I am unable to successfully run :DistantInstall after downloading through packer. When attempting to compile from source, I receive the following error message:

Error executing vim.schedule lua callback: ...ite/pack/packer/start/distant.nvim/lua/distant/utils.lua:475: attempt to compare string with nil                                      
stack traceback:
        ...ite/pack/packer/start/distant.nvim/lua/distant/utils.lua:475: in function 'can_upgrade_version'
        .../pack/packer/start/distant.nvim/lua/distant/cli/init.lua:114: in function 'validate_cli'
        .../pack/packer/start/distant.nvim/lua/distant/cli/init.lua:141: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

When installing a binary, I am able to complete the installation, but when I run :DistantClientVersion I get the following error message:

E5108: Error executing lua ...e/pack/packer/start/distant.nvim/lua/distant/command.lua:424: attempt to call method 'new' (a nil value)                                              
stack traceback:
        ...e/pack/packer/start/distant.nvim/lua/distant/command.lua:424: in function 'client_version'
        [string ":lua"]:1: in main chunk
Press ENTER or type command to continue

I am running GNU/Linux.

Would greatly appreciate if you have any workarounds for this issue!

@chipsenkbeil
Copy link
Owner

What version of distant (the binary) did you install? It looks like you're also using the v0.2 branch. Can you try switching to the v0.3 branch?

You can follow https://distant.dev/editors/neovim/quickstart/ to get started.

@chipsenkbeil chipsenkbeil transferred this issue from chipsenkbeil/distant Aug 1, 2023
@alecplotkin
Copy link
Author

alecplotkin commented Aug 1, 2023

Thanks for the quick reply, I've tried installing both v0.20.0-alpha.10 (prerelease) and v0.20.0-alpha.4 (prerelease) on separate occasions. I also have the v0.3 branch in my packer.lua (according to the instructions in the attached link), but am only getting the option to install v0.2xx binaries using :DistantInstall.

@chipsenkbeil
Copy link
Owner

You should be installing v0.20.0 (no alpha) with v0.3 of the plugin.

@alecplotkin
Copy link
Author

After a little digging, I think it might be an issue with older versions of Ubuntu--I'm currently running 20.04.

I installed distant directly on my machine following the instructions on https://github.com/chipsenkbeil/distant, but when I try to run it from the command line it tells me that my version of glibc is outdated.

distant: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by distant)
distant: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by distant)
distant: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by distant)

Unfortunately, it looks like 2.31 is the latest version available for my version of Ubuntu:

$ apt-cache policy libc6

libc6:
  Installed: 2.31-0ubuntu9.9
  Candidate: 2.31-0ubuntu9.9
  Version table:
 *** 2.31-0ubuntu9.9 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9.7 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     2.31-0ubuntu9 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

@chipsenkbeil
Copy link
Owner

Ah, you can try the musl version. That's what I use on older machines.

@chipsenkbeil
Copy link
Owner

For clarity, you can do this in one of two ways:

  1. With :DistantInstall, if it detects you're on Linux, it's supposed to prompt you if you want GNU or musl.

  2. If you install distant from the terminal, you can specify musl for your machine. For example:

    curl -L https://sh.distant.dev | sh -s -- --distant-host x86_64-unknown-linux-musl
    

What :DistantInstall does is download a binary for you. If distant is detected on your path, it will use that version instead. So following the second approach should ensure you have distant musl being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants