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 script doesn't work correctly with ubuntu #32

Open
sharkymark opened this issue Sep 16, 2024 · 5 comments
Open

install script doesn't work correctly with ubuntu #32

sharkymark opened this issue Sep 16, 2024 · 5 comments
Assignees

Comments

@sharkymark
Copy link

sharkymark commented Sep 16, 2024

install.sh only checks for linux, but it should detect debian and download that release.

curl -fsSL https://wush.dev/install.sh | sh
Downloading wush from https://github.com/coder/wush/releases/download/v0.2.1/wush_0.2.1_linux_arm64.tar.gz...
Extracting wush...
wush installed successfully!
wush serve
bash: /usr/local/bin/wush: Operation not permitted

The container is on a docker host on an Mac M3

uname -m
aarch64

Thus it tries to bring down ..._linux_arm64.tar.gz

I manually wget ...linux_amd64.tar.gz or ...linux_amd64.deb and wush works

@coder-labeler coder-labeler bot added the bug label Sep 16, 2024
@coadler
Copy link
Member

coadler commented Sep 30, 2024

Good find, interesting that it shows aarch64 even in the Docker vm. Will fix

@angrycub
Copy link

angrycub commented Oct 2, 2024

Unless the container is started using the --platform flag, it should be an ARM64 OS running in it. The Docker VM has to match the host architecture and then emulation kicks in for platform switching. Seems unexpected for you to get an architecture mismatch in this case.

@coadler
Copy link
Member

coadler commented Oct 2, 2024

Yeah, pulled out my M2 and wasn't able to reproduce

  1. Installed newest Docker desktop
  2. Pulled latest ubuntu image
  3. Ran docker run -it --rm ubuntu:latest /bin/bash
  4. Ran curl -fsSL https://wush.dev/install.sh | sh in the container
  5. Observed that wush seems to work correctly after installing

Maybe I accidentally fixed this with other changes? If not, could you run file $(which wush) and let me know what it returns?

@sharkymark
Copy link
Author

I use colima which wouldn't surprise me if that is part of the problem. I specifically start colima and docker with arm so am royally confused.

@sharkymark
Copy link
Author

sharkymark commented Oct 7, 2024

@coadler after manually installing wush in the container (which overrode the amd one I had installed), I confirmed I get the

within the colima vm

colima ssh
uname -m
aarch64

cat /etc/os-release
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
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"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo

within the container (based on parent codercom/enterprise-base:ubuntu)

uname -m
aarch64
wush
bash: /usr/local/bin/wush: Operation not permitted
file $(which wush)
/usr/local/bin/wush: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=xyYqC0eps8VRp6k55vNw/5C2t6R3IgNULHG0BL97r/RckZuEQI_Y1kiuWraPkS/bP7fGdEQZaqncc_i5g61, stripped

no worries about debugging or helping, just strange.

@matifali matifali removed the bug label Oct 15, 2024
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

Successfully merging a pull request may close this issue.

4 participants