azure-cli mktemp: Invalid argument

Created on 28 Jan 2019  路  10Comments  路  Source: Azure/azure-cli


Environment summary

Install Method (interactive script) / CLI version (az --version N/A) / Shell Type (bash)


Installation via curl -L https://aka.ms/InstallAzureCli | bash gives the error in the title. Solution: mktemp -t azure_cli_install_tmp_XXXX should be mktemp -t azure_cli_install_tmp_XXXXXX

Installation Packaging good first issue help wanted

All 10 comments

Howdy @mmbatha,

What environment are you running this in? I can't reproduce it on my Mac (10.14.2) or my Linux machine (Fedora 29). Here is the result of running mktemp -t azure_cli_install_tmp_XXXX on each of my machines:

  • Mac: /var/folders/9b/qp8qcdrd74q69ppzl1tzjl700000gn/T/azure_cli_install_tmp_XXXX.lDWTnSyO
  • Linux: /tmp/azure_cli_install_tmp_S4RJ

Admittedly, there's a little ugliness in the path that running this with MacOS results in, but it does fundamentally work for me.

Additionally, I was just able to successfully install the Azure CLI on an Ubuntu container by running the following:

docker run -it ubuntu /bin/bash
apt-get update
apt-get install curl
apt-get install python
curl -L https://aka.ms/InstallAzureCLI | bash # pressing enter for all default locations
ln -s /root/bin/az /usr/local/bin/az
az --version
az self-test

edit: needed curl too

Seeing as I can't repro this, I'm going to close it for now. Please feel free to get back to me, and if it's still a problem for you I'll open it back up.

I was running this on Termux for Android on my HMD Global Nokia 3 smartphone. Screenshot: https://drive.google.com/a/wethinkcode.co.za/file/d/1C8K8cLfIF9d2VmG42cSZrw62KMc7c8a1/view?usp=drivesdk

Thanks for getting back to me, @mmbatha. This seems like a great thing to submit as an Open Source contribution. Mind submitting a PR?

Okay, I will

Pull request #8418 has the requested changes

These changes haves been deployed now.

vsts cli installation failed "mktemp: Invalid argument" on the azure-cli docker image, can someone help here

Howdy @techiechap, I'm afraid the VSTS CLI is a different product. Please checkout https://github.com/Azure/azure-devops-cli-extension for more help.

Was this page helpful?
0 / 5 - 0 ratings