Documentation: RPM Package does not support RHEL/CentOS 6
Following the instructions, (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest#install-on-rhel-fedora-and-centos-with-yum), I installed Azure CLI on RHEL 6.8 VM.
It installs azure-cli.x86_64 0:2.0.18-1.el7 on RHEL 6.x VM.
After the installation, it fails to load with below message az /usr/lib64/az/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
python --version Python 2.6.6
- Do we have separate Azure CLI rpm available for EL6?
- Any plans to include Azure CLI support for Python 2.6.6?
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) yum
OS Version: What OS and version are you using?
cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago)
uname -a Linux rhel68 2.6.32-642.15.1.el6.x86_64 #1 SMP Mon Feb 20 02:26:38 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Bash
We don't plan to support Python 2.6 at this point.
If I install Python 2.7 from source code on RHEL/Centos 6.x VM, yum would not know it and it would fail the Azure CLI installation.
--> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: azure-cli-2.0.18-1.el7.x86_64.
Any plans to make Python 2.7/3.5 rpm and offer as a solution for Azure CLI installation on RHEL/Centos 6.x?
@derekbekoe can you answer the question for RPM? My understanding is that we do offer azure-cli on RPM since 2.0.18.
We do offer azure-cli as an RPM but it supports RHEL/CentOS 7.x. RHEL/CentOS 6.x ships with Python 2.6 and we require at least Python 2.7.
Any plans to make Python 2.7/3.5 rpm and offer as a solution for Azure CLI installation on RHEL/Centos 6.x?
We don't plan to create a Python RPM for 6.x.
If you can install Python 2.7/3.5/3.6 on the machine, you can install the CLI with pip install azure-cli assuming you have the native dependencies installed from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest#a-namelinuxinstall-on-linux-without-apt-get.
do you provide the src.rpm for the azure-cli in order to try to rebuild it with the SCL provided python2.7 version on CentOS/RHEL/SL 6.x ?
We do not provide src.rpm but the build instructions are here so you can build a src.rpm - https://github.com/Azure/azure-cli/tree/master/packaged_releases/rpm.
thx, I will have a look!
some progress, but not there yet https://gist.github.com/truatpasteurdotfr/bad17290a66046a950ac20833d7ed2ac
@sptramer Can we modify install instructions to highlight the RPM package supports RHEL/CentOS 7 - https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest#install-on-rhel-fedora-and-centos-with-yum?
cc: @JasonRShaver
@derekbekoe Rather than a specific Linux distribution, is there an rpm/yum version which the package is explicitly compatible with? This allows us to avoid install-by-distribution and instead focus on install-by-manager.
EDIT: Just noticed this is likely a python compatibility error (what distribution still services 2.6, which has security problems???) so will update the install instructions appropriately.
Not really. It works on RHEL/CentOS 7 but not 6.
Not sure what specific rpm, yum versions but the OS version would be the main indication.
@truatpasteurdotfr - The instructions have been updated to reflect the fact that the CLI depends on Python 2.7 or later. Since Python 2.7 includes critical security fixes and is the end-of-life release of the 2.x series, I would recommend you update your RHEL distribution or find an external repository with packages compatible with RHEL 6.
After updating your Python, libffi, and OpenSSL to their latest available versions, please try installing the CLI again. We are working on finding the minimum required FFI and OpenSSL versions.
Thanks @sptramer. Closing as documentation has been updated.
just FYI: https://www.softwarecollections.org/en/scls/rhscl/python27/ there is a "supported" way to install python2.7 on RHEL6 clones :)
quick and dirty by removing the debuginfo creation... ymmv http://dl.pasteur.fr/fop/LskIyBWt/python27-azure-cli-2.0.16-1.centos6_scl_rh.tgz (unsigned rpm, src.rpm provided with spec file and build command/log) if someone care to try... I don't have any azure account.
I'm also facing this issue on RHEL 6.8:
[root@RM-HQ-PUP ~]# scl enable python27 bash
[root@RM-HQ-PUP ~]# python --version
Python 2.7.8
[root@RM-HQ-PUP ~]# az
Could not import runpy module
[root@RM-HQ-PUP ~]# yum list installed | grep azure
azure-cli.x86_64 2.0.22-1.el7 @azure-cli
[root@RM-HQ-PUP ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
you can't run an el7 rpm on el6... you could try rpm built on c6/devtoolset.
Eventually got it to work by using SCL. A rough outline from the top of my head for others to follow:
scl enable python27 bash
yum install python27-python-pip python27-python-devel
pip install --upgrade pip
pip install azure-cli
Might be worth adding to the docs?
the (possible/likely to happen) issue with "pip install" is that you can be replacing files from the packaged python27-python-pip* , which might be reversed when you upgrade theses SCL packages...