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

CLI 2.0 instructions don't work #6606

Closed
ambakshi opened this issue Apr 2, 2018 — with docs.microsoft.com · 3 comments
Closed

CLI 2.0 instructions don't work #6606

ambakshi opened this issue Apr 2, 2018 — with docs.microsoft.com · 3 comments

Comments

Copy link

ambakshi commented Apr 2, 2018

I tried 'az extensions add --name dns', and got this (on Ubuntu 16.04/xenial)
$ az extension add --name dns
Linux distro check: Mismatch distribution name in /etc/apt/sources.list.d/azure-cli.list file
Linux distro check: If command fails, install the appropriate package for your distribution or change the above file accordingly.
Linux distro check: /etc/apt/sources.list.d/azure-cli.list has 'is', current distro is 'xenial'
An error occurred. Pip failed with status code 1. Use --debug for more information.

There was a comment in the list file that it didn't parse. I fixed that, now it doesn't recognize wheezy. Changed the .list to reference xenial, just to get past this and it still fails. Adding --debug I get:

Executing pip with args: ['install', '--target', '/home/abakshi/.azure/cliextensions/dns', '/tmp/tmpttf650of/dns-0.0.2-py2.py3-none-any.whl']
Running: ['/opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/abakshi/.azure/cliextensions/dns', '/tmp/tmpttf650of/dns-0.0.2-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
Traceback (most recent call last):
File "/opt/az/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/az/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/opt/az/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/opt/az/lib/python3.6/site-packages/pip/init.py", line 28, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/opt/az/lib/python3.6/site-packages/pip/vcs/mercurial.py", line 9, in
from pip.download import path_to_url
File "/opt/az/lib/python3.6/site-packages/pip/download.py", line 36, in
from pip.utils.glibc import libc_ver
File "/opt/az/lib/python3.6/site-packages/pip/utils/glibc.py", line 4, in
import ctypes
File "/opt/az/lib/python3.6/ctypes/init.py", line 7, in
from _ctypes import Union, Structure, Array
ImportError: libffi.so.5: cannot open shared object file: No such file or directory

Command '['/opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/abakshi/.azure/cliextensions/dns', '/tmp/tmpttf650of/dns-0.0.2-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/abakshi/.azure/cliextensions/dns
An error occurred. Pip failed with status code 1. Use --debug for more information.

I managed to get it working by doing the following steps manually:

mkdir -p ~/.azure/cliextensions/dns
cd ~/.azure/cliextensions/dns
wget https://dnscliextension.blob.core.windows.net/cliextensions/dns-0.0.2-py2.py3-none-any.whl
unzip dns-0.0.2-py2.py3-none-any.whl


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@femsulu
Copy link
Member

femsulu commented Apr 2, 2018

@ambakshi Thanks for the feedback. We are actively investigating and will get back to you soon.

@derekbekoe
Copy link
Contributor

@ambakshi Change /etc/apt/sources.list.d/azure-cli.list to match your distro (so xenial) then run apt-get update. This will pull down the xenial version of the CLI. Then, the extension add should work.
See my comment at Azure/azure-cli-extensions#65 (comment)

@ambakshi
Copy link
Author

That fixed it, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants