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 fails silently on Raspberry Pi 4 #157

Closed
fungl164 opened this issue Dec 31, 2020 · 7 comments
Closed

Install fails silently on Raspberry Pi 4 #157

fungl164 opened this issue Dec 31, 2020 · 7 comments

Comments

@fungl164
Copy link

When running $ goenv install 1.15.6 on an RPi4 (arm64) the program fails silently without installing anything. Any clues? Thank you...

@fungl164
Copy link
Author

FYI running $ make on ~/.goenv yields the the following:

 ✓ prints go-build version when '--version' argument is given
 ✗ {before,after}_install hooks get triggered when '--force' argument and version argument is not already installed version and gets installed
   (from function `assert_equal' in file test/./test_assert_helpers.bash, line 33,
    from function `assert_output' in file test/./test_assert_helpers.bash, line 60,
    in test file test/goenv-install.bats, line 728)
     `assert_output <<-OUT' failed
   expected: (newline not part of expected output)
   before: TEST_DIR/root/versions/1.2.2
   Downloading 1.2.2.tar.gz...
   -> http://localhost:8090/1.2.2/1.2.2.tar.gz
   Installing Go Linux 64bit 1.2.2...
   Installed Go Linux 64bit 1.2.2 to TEST_DIR/root/versions/1.2.2

   after: 0
   REHASHED
   actual: (newline not actual output)
   before: TEST_DIR/root/versions/1.2.2
   after: 0
   REHASHED
 ✗ {before,after}_install hooks get triggered when '-f' argument and version argument is not already installed version and gets installed
   (from function `assert_equal' in file test/./test_assert_helpers.bash, line 33,
    from function `assert_output' in file test/./test_assert_helpers.bash, line 60,
    in test file test/goenv-install.bats, line 783)
     `assert_output <<-OUT' failed
   expected: (newline not part of expected output)
   before: TEST_DIR/root/versions/1.2.2
   Downloading 1.2.2.tar.gz...
   -> http://localhost:8090/1.2.2/1.2.2.tar.gz
   Installing Go Linux 64bit 1.2.2...
   Installed Go Linux 64bit 1.2.2 to TEST_DIR/root/versions/1.2.2

   after: 0
   REHASHED
   actual: (newline not actual output)
   before: TEST_DIR/root/versions/1.2.2
   after: 0
   REHASHED
 ✗ rehashes shims when '-f' argument and version argument is not already installed version and gets installed
   (from function `assert_equal' in file test/./test_assert_helpers.bash, line 33,
    from function `assert_output' in file test/./test_assert_helpers.bash, line 60,
    in test file test/goenv-install.bats, line 825)
     `assert_output <<-OUT' failed
   expected: (newline not part of expected output)
   Downloading 1.2.2.tar.gz...
   -> http://localhost:8090/1.2.2/1.2.2.tar.gz
   Installing Go Linux 64bit 1.2.2...
   Installed Go Linux 64bit 1.2.2 to TEST_DIR/root/versions/1.2.2
   actual: (newline not actual output)

 ✗ adds patch version '0' to definition when version argument is not already installed version and gets installed
   (from function `assert_equal' in file test/./test_assert_helpers.bash, line 33,
    from function `assert_output' in file test/./test_assert_helpers.bash, line 60,
    in test file test/goenv-install.bats, line 894)
     `assert_output <<-OUT' failed
   expected: (newline not part of expected output)
   Adding patch version 0 to 1.2
   Downloading 1.2.0.tar.gz...
   -> http://localhost:8090/1.2.0/1.2.0.tar.gz
   Installing Go Linux 64bit 1.2.0...
   Installed Go Linux 64bit 1.2.0 to TEST_DIR/root/versions/1.2.0
   actual: (newline not actual output)
   Adding patch version 0 to 1.2
 ✓ has usage instructions

Thnxs!

@fungl164
Copy link
Author

Found a temporary solution:

$ export GOPKG=go1.15.6.linux-arm64.tar.gz
$ wget https://golang.org/dl/$GOPKG 
$ tar -C ~/.goenv/versions/1.15.6 -xvf $GOPKG 
$ goenv global 1.15.6 && goenv rehash
$ rm $GOPKG

@byronvanstien
Copy link

Same issue here; tried reinstalling, using Brew (vs cloning manually), checked and played around with my ~/.zshrc a lot, too. It's quite the pickle.

Thanks for the temporary fix @fungl164.

@egonbraun
Copy link

egonbraun commented Feb 6, 2021

The same issue is happening with me in Macbook Air M1. A workaround for this would be to run it like this:

arch -arch x86_64 goenv install 1.15.7

This way you do not need to open your terminal in rosetta mode. You can also alias some of these commands that are still having issues in Apple Sillicon.

alias goenv="arch -arch x86_64 goenv"

Or maybe even create some shallow wrapper functions:

function _goenv() {
  arch -arch x86_64 goenv $*
}

This way you can run them like this until we have a solution.

_goenv version

@radeksimko
Copy link
Contributor

I agree that the UX of goenv install silently failing is not great, but for M1 (Apple Silicon) darwin/arm64 support was not officially introduced until Go 1.17, so it makes sense that the installation of any version below 1.17 would fail on that platform.

@ChronosMasterOfAllTime
Copy link
Collaborator

would it be useful to allow "build from source" for older versions?

@ChronosMasterOfAllTime
Copy link
Collaborator

dupe of #106

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

5 participants