Installing the Azure CLI on Fedora 27
Published on 7 Dec 2017 · Filed in Tutorial · 255 words (estimated 2 minutes to read)This post is a follow-up to a post from earlier this year on manually installing the Azure CLI on Fedora 25. I encourage you to refer back to that post for a bit of background. I’m writing this post because the procedure for manually installing the Azure CLI on Fedora 27 is slightly different than the procedure for Fedora 25.
Here are the steps to install the Azure CLI into a Python virtual environment on Fedora 27. Even though they are almost identical to the Fedora 25 instructions (one additional package is required), I’m including all the information here for the sake of completeness.
-
Make sure that the “gcc”, “libffi-devel”, “python-devel”, “openssl-devel”, “python-pip”, and “redhat-rpm-config” packages are installed (you can use
dnf
to take care of this). Some of these packages may already be installed; during my testing with a Fedora 27 Cloud Base Vagrant image, these needed to be installed. (The change from Fedora 25 is the addition of the “redhat-rpm-config” package.) -
Install virtualenv either with
pip install virtualenv
ordnf install python2-virtualenv
. I useddnf
, but I don’t think the method you use here will have any material effects. -
Create a new Python virtual environment with
virtualenv azure-cli
(feel free to use a different name). -
Activate the new virtual environment (typically accomplished by sourcing the
azure-cli/bin/activate
script; substitute the name you used when creating the virtual environment if you didn’t name itazure-cli
). -
Install the Azure CLI with
pip install azure-cli
. Once this command completes, you should be ready to roll.
That’s it!