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

Can't run pachctl on WSL2 #8480

Open
Persedes opened this issue Dec 27, 2022 · 6 comments
Open

Can't run pachctl on WSL2 #8480

Persedes opened this issue Dec 27, 2022 · 6 comments
Labels

Comments

@Persedes
Copy link

Persedes commented Dec 27, 2022

What happened?:

Following the local pachyderm instructions (running on WSL2 / 20.04):

  • Install homebrew and run the Next steps
    • tested everything works via brew install hello
  • install pachctl via brew tap pachyderm/tap && brew install pachyderm/tap/pachctl@2.4

Trying to run pachctl, gives the following message:

pachctl
zsh: permission denied: pachctl

# same when running it via bash:
/bin/bash pachctl
/home/linuxbrew/.linuxbrew/bin/pachctl: /home/linuxbrew/.linuxbrew/bin/pachctl: cannot execute binary file

What you expected to happen?:

Not get the permission denied: pachctl message.

How to reproduce it (as minimally and precisely as possible)?:

# run the next steps as recommended from the following command too
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

brew tap pachyderm/tap && brew install pachyderm/tap/pachctl@2.4
pachctl

Anything else we need to know?:
Installing other packages via brew seems to work, so I don't think its a homebrew issue. (E.g. I can finish the local deploy guide, including the helm install via brew)

Environment?:

  • Kubernetes version (use kubectl version):
  • Pachyderm CLI and pachd server version (use pachctl version):
  • Cloud provider (e.g. aws, azure, gke) or local deployment (e.g. minikube vs dockerized k8s):
  • If you deployed with helm, the values you used (helm get values pachyderm):
  • OS (e.g. from /etc/os-release):
  • Others:

This is on WSL2 .

cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

The permissions for linuxbrew look allright:

ls -lhA /home/linuxbrew/.linuxbrew/bin/pachctl
lrwxrwxrwx 1 mheiser mheiser 40 Dec 27 09:14 /home/linuxbrew/.linuxbrew/bin/pachctl -> ../Cellar/pachctl@2.4/v2.4.2/bin/pachctl
@Persedes Persedes added the bug label Dec 27, 2022
@Persedes Persedes changed the title Canpachctl Can run pachctl on WSL2 Dec 27, 2022
@Persedes Persedes changed the title Can run pachctl on WSL2 Can't run pachctl on WSL2 Dec 27, 2022
@Persedes
Copy link
Author

Turns out the Cellar permissions were off, so I tried to fix them:

ls -lhA /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/pachctl                                                                                                             -r--r--r-- 1 mheiser mheiser 81M Dec  8 13:14 /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/pachctl
                                                                                                                                                                                                                                                                                                                                                             chmod 555 /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/pachctl         

# But now getting:
pachctl
zsh: exec format error: pachctl

/home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/pachctl
zsh: exec format error: /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/pachctl                                                                                                    

@BOsterbuhr
Copy link
Contributor

Try to install pachctl@2.3 and see if that works. Random thought, do you have an x86 or ARM CPU?

@Persedes
Copy link
Author

Persedes commented Dec 27, 2022

Same issue:

➜  ~ brew uninstall pachyderm/tap/pachctl@2.4
Uninstalling /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2... (3 files, 80.3MB)
➜  ~ pachctl
zsh: command not found: pachctl

➜  ~ brew install pachyderm/tap/pachctl@2.3
==> Fetching pachyderm/tap/pachctl@2.3
==> Downloading https://github.com/pachyderm/pachyderm/releases/download/v2.3.9/pachctl_2.3.9_darwin_amd64.zip
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/23653453/d94d8e94-5374-4a1e-bcc5-9c572f97d280?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSV
######################################################################## 100.0%
==> Installing pachctl@2.3 from pachyderm/tap
🍺  /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.3/v2.3.9: 3 files, 80.9MB, built in 4 seconds
==> Running `brew cleanup pachctl@2.3`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
➜  ~ pachctl
zsh: permission denied: pachctl
➜  ~ chmod 555 /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.3/v2.3.9/bin/pachctl
➜  ~ pachctl
zsh: exec format error: pachctl

and I'm on an x64 CPU (i7)

@Persedes
Copy link
Author

ah, I think this is the problem:

==> Downloading https://github.com/pachyderm/pachyderm/releases/download/v2.3.9/pachctl_2.3.9_darwin_amd64.zip

Homebrew chose the darwin_amd64
If I use the amd_64.targ.gz from https://github.com/pachyderm/pachyderm/releases it works.
Maybe something in homebrew is getting confused which one to choose?

@BOsterbuhr
Copy link
Contributor

Ah yes this is an issue we just identified before our winter break. I will keep this issue open and will talk with the team in the new year and update this when we have a fix. Sorry for the inconvenience.

@Persedes
Copy link
Author

All good, in case others find it helpful, here's a fix for 2.4

wget https://github.com/pachyderm/pachyderm/releases/download/v2.4.2/pachctl_2.4.2_linux_amd64.tar.gz
tar -xf pachctl_2.4.2_linux_amd64.tar.gz 

# change permissions, so we can delete the old file (sudo rm should work too)
chmod 777 /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/pachctl

# install the new one
cp pachctl_2.4.2_linux_amd64/pachctl /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/
# fix permissions
chmod 555 /home/linuxbrew/.linuxbrew/Cellar/pachctl@2.4/v2.4.2/bin/pachctl
# confirm everything works
pachctl

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