azure-cli installation on Ubuntu Bionic (18.04)

No deb packages have been released yet for Ubuntu 18.04, so you have to use the script MS provided here. However, you will face the following error immediately:

 fatal error: Python.h: No such file or directory

To resolve this, simply install the python-dev package:

sudo apt install python-dev

Then run the script normally:

curl -L https://aka.ms/InstallAzureCli | bash

Once done, exit the terminal and open a new one.

That’s it! Enjoy!

Sources:

  1. https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest
  2. https://github.com/Azure/azure-docs-cli-python/issues/755
  3. https://github.com/benhoyt/scandir/issues/85
Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , , , . Bookmark the permalink.

Leave a comment