question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

azure --version still reports old version after upgrade using apt-get

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

I upgraded to the latest version of azure-cli in Ubuntu, but typing in az --version still shows an older version installed.

I then realized that running az from WSL is actually executing az for Windows.

running this command:

sudo apt-get install azure-cli

I see: Reading package lists… Done Building dependency tree Reading state information… Done azure-cli is already the newest version (2.14.0-1~focal). 0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.

but when I type:

az --version

I see: azure-cli 2.13.0 *

core 2.13.0 * telemetry 1.0.6

Python location ‘C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe’ Extensions directory ‘C:\Users\MarcusPowrie.azure\cliextensions’

Python (Windows) 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

You have 2 updates available. Consider updating your CLI installation with ‘az upgrade’

Please let us know how we are doing: https://aka.ms/azureclihats and let us know if you’re interested in trying out our newest features: https://aka.ms/CLIUXstudy

Errors:

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here…
  • ``

Expected Behavior

Environment Summary

Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: 

azure-cli 2.13.0 *

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mpowriecommented, Dec 23, 2020

Hi Feng Zhou,

Thanks. I was surprised to see my Windows host OS path entries mixed into my WSL bash paths - I’ll remove the redundant Windows paths from WSL.

On Tue, 22 Dec 2020 at 00:01, Feng Zhou notifications@github.com wrote:

@mpowrie https://github.com/mpowrie normally after you installed azure-cli in WSL and run which az, you should see /usr/bin/az no matter whether you installed azure-cli with MSI in windows. If not, then you need to fix your PATH variable.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/15675#issuecomment-748961769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPBZT7XRXQD2SWHLIJPMDSV5BKZANCNFSM4TAOEWHA .

0reactions
fengzhou-msftcommented, Dec 21, 2020

@mpowrie normally after you installed azure-cli in WSL and run which az, you should see /usr/bin/az no matter whether you installed azure-cli with MSI in windows. If not, then you need to fix your PATH variable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install the Azure CLI on Linux - Microsoft Learn
Older versions can be updated by reinstalling as described in Install the Azure CLI. This command will also update all installed extensions by...
Read more >
"The following packages have been kept back:" Why and how ...
A regular apt-get upgrade command will install any package from any software source that is enabled; dist-upgrade is not unique in this way....
Read more >
How to upgrade from Ubuntu 18.04 LTS to 20.04 LTS today
If you are currently using an older version of Ubuntu, you may be interested in upgrading ... You can still do an upgrade...
Read more >
Updates and Upgrades - The official Checkmk User Guide
Here the site mysite is to be updated to the Checkmk-version ... Note: When installing a local package via apt install , you...
Read more >
Upgrading GitLab
Pause your runners or block new jobs from starting by adding following to ... Any older version of GitLab upgrading to 8.12 or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found