jesseduffield / jesseduffield/lazygit

For Ubuntu for example, check first the architekture (x86_64 / aarch64)

Open
#4,283 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
lazygit won't run: Error: cannot execute binary file: Exec format error

**To Reproduce**
If you have an **aarch64** architecture (uname -m) , try run this as stated under Installation "Ubuntu"

LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit -D -t /usr/local/bin/

**Add ARCH=$(uname -m) and the case statement to the installationscript**

ARCH=$(uname -m)
case $ARCH in
x86_64) ARCH='Linux_x86_64';;
aarch64 | armv8*) ARCH='Linux_arm64';;
armv7* | armv6*) ARCH='Linux_armv6';;
*) echo "Unsupported architecture: $ARCH"; exit 1;;
esac

**suggested installationscript**

ARCH=$(uname -m)
case $ARCH in
x86_64) ARCH='Linux_x86_64';;
aarch64 | armv8*) ARCH='Linux_arm64';;
armv7* | armv6*) ARCH='Linux_armv6';;
*) echo "Unsupported architecture: $ARCH"; exit 1;;
esac
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION_${ARCH}.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin/

**Further testing (armv7 / armv6) architecture**

I have installed lazygit version 0.46.0 on aarch64.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.