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

Unable to install for Ubuntu 24.04 #28872

Closed
dixonwille opened this issue May 2, 2024 · 9 comments · Fixed by #28888
Closed

Unable to install for Ubuntu 24.04 #28872

dixonwille opened this issue May 2, 2024 · 9 comments · Fixed by #28888
Assignees
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request Possible-Solution Similar-Issue
Milestone

Comments

@dixonwille
Copy link

Describe the bug

With Ubuntu 24.04 being released, I first checked to see if noble was available in https://packages.microsoft.com/repos/azure-cli/dists/.

Since it is not available yet, I tried to use the install script instead curl -L https://aka.ms/InstallAzureCli | bash.

Using the defaults for everything in the script (not specifying any strange paths for install directory or bin directory), I receive an error.

Related command

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

Errors

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1405  100  1405    0     0   1981      0 --:--:-- --:--:-- --:--:--  228k
Downloading Azure CLI install script from https://azurecliprod.blob.core.windows.net/install.py to /tmp/azure_cli_install_tmp_DELCpg.
######################################################################## 100.0%
/tmp/azure_cli_install_tmp_DELCpg: OK
Running install script.
-- Verifying Python version.
-- Python version 3.12.3 okay.
-- Verifying native dependencies.
-- Unable to verify native dependencies. dist=ubuntu, version=24.04. Continuing...

===> In what directory would you like to place the install? (leave blank to use '/home/wdixon/lib/azure-cli'):
-- Creating directory '/home/wdixon/lib/azure-cli'.
-- We will install at '/home/wdixon/lib/azure-cli'.

===> In what directory would you like to place the 'az' executable? (leave blank to use '/home/wdixon/bin'):
-- Creating directory '/home/wdixon/bin'.
-- The executable will be in '/home/wdixon/bin'.
-- Downloading virtualenv package from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-16.7.11.tar.gz.
-- Downloaded virtualenv package to /tmp/tmp1d0rj52p/virtualenv-16.7.11.tar.gz.
-- Checksum of /tmp/tmp1d0rj52p/virtualenv-16.7.11.tar.gz OK.
-- Extracting '/tmp/tmp1d0rj52p/virtualenv-16.7.11.tar.gz' to '/tmp/tmp1d0rj52p'.
-- Executing: ['/usr/bin/python3', 'virtualenv.py', '--python', '/usr/bin/python3', '/home/wdixon/lib/azure-cli']
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/wdixon/lib/azure-cli/bin/python3
Also creating executable in /home/wdixon/lib/azure-cli/bin/python
ERROR: The executable /home/wdixon/lib/azure-cli/bin/python3 is not functioning
ERROR: It thinks sys.prefix is '/usr' (should be '/home/wdixon/lib/azure-cli')
ERROR: virtualenv is not compatible with this system or executable
Traceback (most recent call last):
  File "/tmp/azure_cli_install_tmp_DELCpg", line 415, in <module>
    main()
  File "/tmp/azure_cli_install_tmp_DELCpg", line 399, in main
    create_virtualenv(tmp_dir, install_dir)
  File "/tmp/azure_cli_install_tmp_DELCpg", line 144, in create_virtualenv
    exec_command(cmd, cwd=working_dir)
  File "/tmp/azure_cli_install_tmp_DELCpg", line 105, in exec_command
    subprocess.check_call(command_list, cwd=cwd, env=env)
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'virtualenv.py', '--python', '/usr/bin/python3', '/home/wdixon/lib/azure-cli']' returned non-zero exit status 100.

Issue script & Debug output

N/A

Expected behavior

I would expect to either setup the PPA or use the Install script to successfully get a working version of the Azure CLI.

Environment Summary

$ python3 --version
Python 3.12.3

$ which python3
/usr/bin/python3

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

Additional context

No response

@dixonwille dixonwille added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 2, 2024
Copy link

Hi @dixonwille
Find similar issue #23215.

Issue title Virtualenv step failing in install script
Create time 2022-07-15
Comment number 2

Possible solution:
The error message in the new issue is similar to the error message in the old issue. The old issue suggests that the installation script is outdated and provides a guide to install azure-cli with pip. You can follow the guide to install azure-cli with pip.


Please confirm if this resolves your issue.

@yonzhan
Copy link
Collaborator

yonzhan commented May 2, 2024

Ubuntu 24.04 support is planned in our next sprint.

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label May 2, 2024
@dixonwille
Copy link
Author

dixonwille commented May 2, 2024

While the bot may have found a solution to my problem for now. With Ubuntu 24.04 being LTS and publicly released (no longer in preview), would love to see an official .deb package in the PPA (https://packages.microsoft.com/repos/azure-cli/dists/) with noble being supported.

@yonzhan yonzhan added feature-request Azure CLI Team The command of the issue is owned by Azure CLI team and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels May 2, 2024
@yonzhan yonzhan added this to the Backlog milestone May 2, 2024
@rakibmirza
Copy link

rakibmirza commented May 3, 2024

I can also confirm the same issue. Azure cli in previous 22.04 LTS had a release file and was working fine. But in latest 24.04 there is no way to get cli working. It is causing problem for developers who work in azure and want to be on the latest Ubuntu distro.

E: The repository 'https://packages.microsoft.com/repos/azure-cli noble Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default.

@dixonwille
Copy link
Author

@rakibmirza I wrote the following work around to get it installed. It assumes it is ran as root.

azureEnv="/usr/local/share/azure-cli-env"
python3 -m venv "$azureEnv"
"$azureEnv/bin/python" -m pip install --upgrade pip
"$azureEnv/bin/python" -m pip install --upgrade setuptools
"$azureEnv/bin/python" -m pip install azure-cli
ln -s "$azureEnv/bin/az" /usr/local/bin/az

@bebound
Copy link
Contributor

bebound commented May 6, 2024

The install script is deprecated.

We'll release a package for 24.04

@PriyankaRudramaina
Copy link

@bebound Do we have an ETA on this? If not do we have any workaround?

@bebound
Copy link
Contributor

bebound commented May 14, 2024

It will be released on May 21.

@dixonwille
Copy link
Author

@PriyankaRudramaina

@bebound Do we have an ETA on this? If not do we have any workaround?

See this comment for a workaround I am currently using.

#28872 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request Possible-Solution Similar-Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants