Azure-cli: WLS on Windows 10 and Ubuntu 18.04 azure-cli package not found

Created on 23 May 2018  路  4Comments  路  Source: Azure/azure-cli

Describe the bug
Azure Cli on 18.04 WLS Windows 10 won't install

To Reproduce
Install 18.04 from Windows 10 Store
Update and upgrade 18.04
sudo apt-get update && sudo apt-get install azure-cli

Output
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [83.2 kB]
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [62.5 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [23.0 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [80.9 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [32.4 kB]
Fetched 365 kB in 7s (53.5 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package azure-cli

Expected behavior
Azure Cli package should be located.

Environment summary
Followed instructions here: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest

Additional context
Add any other context about the problem here.

Packaging

Most helpful comment

Note that after setting the AZ_REPO variable as explained by @YasserAsmi, you also have to re-run the sudo apt-get update command before sudo apt-get install azure-cli will resolve the azure-cli package location.

All 4 comments

@rajurs according to the output, the APT didn't visit https://packages.microsoft.com/repos/azure-cli/. Could you double check if the source list is updated correctly?

Closing due to inactivity.

This happens if you are following instructions (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest) but miss a step.

When using the copy button for bash commands on the web page, and pasting it in bash, sometime it is possible that the last command in the group is not executed because an enter wasn't pressed. In my case, AZ_REPO wasn't set properly.

Note that after setting the AZ_REPO variable as explained by @YasserAsmi, you also have to re-run the sudo apt-get update command before sudo apt-get install azure-cli will resolve the azure-cli package location.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dhermans picture dhermans  路  3Comments

ambakshi picture ambakshi  路  3Comments

Kannaj picture Kannaj  路  3Comments

oakeyc picture oakeyc  路  3Comments

troydai picture troydai  路  3Comments