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

./fzf/install go get error: cp: cannot stat ‘/tmp/fzf-gopath/bin/fzf’: No such file or directory #3365

Closed
5 tasks
samuelfite opened this issue Jul 11, 2023 · 1 comment
Labels

Comments

@samuelfite
Copy link

samuelfite commented Jul 11, 2023

  • [x ] I have read through the manual page (man fzf)
  • [x ] I have the latest version of fzf
  • [x ] I have searched through the existing issues

Info

  • OS
    • [ x] Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • [x ] bash
    • zsh
    • fish

Problem / Steps to reproduce

On 32-bit centos VM with Windows 10 host: ( 4.14.94-200.el7.i686+PAE #1 SMP Mon Feb 18 19:45:05 UTC 2019 i686 i686 i386 GNU/Linux )

error:
GOPATH/GOROOT unset: cp: cannot stat ‘/tmp/fzf-gopath/bin/fzf’: No such file or directory
GOPATH/GOROOT set: cp: cannot stat ‘/usr/local/go//bin/fzf’: No such file or directory

` ~ $ .fzf/install

  • version=0.42.0
  • auto_completion=
  • key_bindings=
  • update_config=2
  • shells='bash zsh fish'
  • prefix='~/.fzf'
  • prefix_expand=/home/user/.fzf
  • fish_dir=/home/user/.config/fish
    ++ dirname .fzf/install
  • cd .fzf
    ++ pwd
  • fzf_base=/home/user/.fzf
    ++ printf %q /home/user/.fzf
  • fzf_base_esc=/home/user/.fzf
    ++ uname -sm
  • archi='Linux i686'
  • binary_available=1
  • binary_error=
  • case "$archi" in
  • binary_available=0
  • binary_error=1
  • cd /home/user/.fzf
  • '[' -n 1 ']'
  • '[' 0 -eq 0 ']'
  • echo 'No prebuilt binary for Linux i686 ...'
    No prebuilt binary for Linux i686 ...
  • command -v go
  • echo -n 'Building binary (go get -u github.com/junegunn/fzf) ... '
    Building binary (go get -u github.com/junegunn/fzf) ... + '[' -z '' ']'
  • export GOPATH=/tmp/fzf-gopath
  • GOPATH=/tmp/fzf-gopath
  • mkdir -p /tmp/fzf-gopath
  • go get -ldflags '-s -w -X main.version=0.42.0 -X main.revision=go-get' github.com/junegunn/fzf
    go: downloading golang.org/x/sys v0.10.0
    go: downloading github.com/mattn/go-runewidth v0.0.14
    go: downloading github.com/mattn/go-shellwords v1.0.12
    go: downloading github.com/rivo/uniseg v0.4.4
    go: downloading github.com/saracen/walker v0.1.3
    go: downloading github.com/gdamore/tcell/v2 v2.5.4
    go: downloading golang.org/x/term v0.10.0
    go: downloading github.com/mattn/go-isatty v0.0.17
    go: downloading golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
    go: downloading github.com/gdamore/encoding v1.0.0
    go: downloading golang.org/x/text v0.5.0
    go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
  • echo OK
    OK
  • cp /tmp/fzf-gopath/bin/fzf /home/user/.fzf/bin/
    cp: cannot stat ‘/tmp/fzf-gopath/bin/fzf’: No such file or directory

`
Workaround found:
in .fzf/install, change go get to go install:
# if go get -ldflags "-s -w -X main.version=$version -X main.revision=go-get" github.com/junegunn/fzf; then
if go install -ldflags "-s -w -X main.version=$version -X main.revision=go-get" github.com/junegunn/fzf; then

@junegunn
Copy link
Owner

Fixed it, thanks!

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

No branches or pull requests

2 participants