Skip to content

AzureCLI for Ubuntu Linux on ARM64 does not run #22875

@tuhin-52321

Description

@tuhin-52321

Related commands

Installed AzureCLI on Ubuntu Linux for ARM64 using the manual steps. All installed correctly:

sudo apt-get update

Hit:1 https://packages.microsoft.com/repos/azure-cli focal InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Hit:2 https://apt.llvm.org/focal llvm-toolchain-focal-14 InRelease
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1317 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 c-n-f Metadata [15.2 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [878 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe Translation-en [209 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 c-n-f Metadata [19.2 kB]
Fetched 2774 kB in 3s (1084 kB/s)
Reading package lists... Done

sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg

Reading package lists... Done
Building dependency tree
Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu2).
ca-certificates is already the newest version (20211016~20.04.1).
ca-certificates set to manually installed.
curl is already the newest version (7.68.0-1ubuntu2.11).
gnupg is already the newest version (2.2.19-3ubuntu2.1).
The following packages will be upgraded:
apt-transport-https
1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 1704 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 apt-transport-https all 2.0.9 [1704 B]
Fetched 1704 B in 0s (5778 B/s)
(Reading database ... 173195 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.0.9_all.deb ...
Unpacking apt-transport-https (2.0.9) over (2.0.8) ...
Setting up apt-transport-https (2.0.9) ...

curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list

deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ focal main

sudo apt-get update

Hit:1 https://packages.microsoft.com/repos/azure-cli focal InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:3 https://apt.llvm.org/focal llvm-toolchain-focal-14 InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Reading package lists... Done

sudo apt-get install azure-cli

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
azure-cli
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/79.3 MB of archives.
After this operation, 1098 MB of additional disk space will be used.
Selecting previously unselected package azure-cli.
(Reading database ... 122044 files and directories currently installed.)
Preparing to unpack .../azure-cli_2.37.0-1 focal_all.deb ...
Unpacking azure-cli (2.37.0-1focal) ...
Setting up azure-cli (2.37.0-1
focal) ...

But when run az version it gave below error:
az version

/usr/bin/az: line 3: /usr/bin/../../opt/az/bin/python3: cannot execute binary file: Exec format error

Describe the bug
The python binary installed is x86_x64 binary!!!

To Reproduce
Install on Linux ARM64 machine (aarch64 version)

Expected behavior
az commands run correctly
Environment summary
Ubuntu 20.04.4 LTS (GNU/Linux 5.13.0-1029-azure aarch64)

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions