azure --version still reports old version after upgrade using apt-get
See original GitHub issueThis 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:
- Created 3 years ago
- Comments:6 (4 by maintainers)
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 normally after you installed
azure-cli
in WSL and runwhich az
, you should see/usr/bin/az
no matter whether you installedazure-cli
with MSI in windows. If not, then you need to fix yourPATH
variable.