Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az extension add fail / WSL2 / Ubuntu 20.04 #14777

Closed
johnwildes opened this issue Aug 13, 2020 · 9 comments
Closed

az extension add fail / WSL2 / Ubuntu 20.04 #14777

johnwildes opened this issue Aug 13, 2020 · 9 comments
Assignees
Labels
Extensions `az extension` commands or extension infrastructure OKR3.2 Candidate

Comments

@johnwildes
Copy link
Contributor

Describe the bug*
az extension add fails

When installing the extension for azure-firewall I run the cmd az extension add -n azure-firewall and get a failure message

An error occurred. Pip failed with status code 1. Use --debug for more information.

I re-ran the cmd with --debug and receive an error, which has pertinent information snipped below

ImportError: libffi.so.6: cannot open shared object file: No such file or directory
Command '['/opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/john/.azure/cliextensions/azure-firewall', '/tmp/tmpjwtv5til/azure_firewall-0.5.0-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1.
Pip failed so deleting anything we might have installed at /home/john/.azure/cliextensions/azure-firewall
cli.azure.cli.core.util : An error occurred. Pip failed with status code 1. Use --debug for more information.
An error occurred. Pip failed with status code 1. Use --debug for more information.
Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f7a3f91cea0>]
az_command_data_logger : exit code: 1
Command ran in 2.511 seconds (init: 0.116, invoke: 2.394)

To Reproduce
attempt to add extension azure-firewall to cli

run command az extension add -n azure-firewall

Expected behavior
azure-firewall extension should install and return

The installed extension 'azure-firewall' is in preview.

Environment summary

Linux-4.19.104-microsoft-standard-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.10.1

Additional context
I was able to run the install cmd to get az cli installed without issues on a clean 20.04 WSL image

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 13, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Aug 13, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 13, 2020

installing

@Juliehzl Juliehzl added the Extensions `az extension` commands or extension infrastructure label Aug 14, 2020
@Juliehzl
Copy link
Contributor

@haroldrandom or @fengzhou-msft, could you have take a look?

@yonzhan yonzhan added this to the S175 - For Ignite milestone Aug 14, 2020
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Aug 14, 2020
@haroldrandom
Copy link
Contributor

haroldrandom commented Aug 26, 2020

HI @johnwildes, Sorry I couldn't reprod your situation. It worked for me. If that's case, could you give it a try for Azure CLI 2.11.0? Or try it again because it might be a network problem

@johnwildes
Copy link
Contributor Author

johnwildes commented Aug 28, 2020

@haroldrandom Recently updated to az cli 2.11.1 condition is the same. Not sure how network factors into this.

@haroldrandom
Copy link
Contributor

@johnwildes Could you post the log trying to install azure-firewall via raw command pip install https://azurecliprod.blob.core.windows.net/cli-extensions/azure_firewall-0.6.0-py2.py3-none-any.whl in this environment?

BTW, Have you installed another older Azure CLI via MSI ? If so, try to remove it first.

@johnwildes
Copy link
Contributor Author

@haroldrandom I ran the cmd you posted above and attached is the output. It worked successfully. The AZCLI isn't installed via MSI, I ran the curl script within WSL to install it.

Collecting azure-firewall==0.6.0 from https://azurecliprod.blob.core.windows.net/cli-extensions/azure_firewall-0.6.0-py2.py3-none-any.whl
  Downloading https://azurecliprod.blob.core.windows.net/cli-extensions/azure_firewall-0.6.0-py2.py3-none-any.whl (574kB)
     |████████████████████████████████| 583kB 592kB/s
Installing collected packages: azure-firewall
Successfully installed azure-firewall-0.6.0
 base  john  10M-PS-9330  ~  $ ```

@johnwildes
Copy link
Contributor Author

I'm trying az network firewall cli commands and they aren't working. I've restarted the WSL environment, and I've authenticated to azure again. Not sure that last part matters.

image

@haroldrandom
Copy link
Contributor

@johnwildes From the original log you posted, I noticed that there is an error ImportError: libffi.so.6: cannot open shared object file: No such file or directory reporting.

There are some related issues like you said you could refer to Azure/azure-cli-extensions#65. You might get some ideas from there.

As for The AZCLI isn't installed via MSI, I ran the curl script within WSL to install it., I don't mean the way you install Azure CLI but I suspect you might install another Azure CLI in your host machine which is Windows, becasue we find the existing older MSI installed CLI might effect the CLI in WSL.

@johnwildes
Copy link
Contributor Author

@haroldrandom thanks for the info. WRT the MSI installed AZ CLI, there is none. I only use CLI in WSL. I'm just going to destroy this image and start over again. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extensions `az extension` commands or extension infrastructure OKR3.2 Candidate
Projects
None yet
Development

No branches or pull requests

4 participants