Skip to content

Install script fails with: main: line 908: http_code: unbound variable #22667

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

Closed
viceice opened this issue Feb 5, 2021 · 2 comments
Closed

Comments

@viceice
Copy link

viceice commented Feb 5, 2021

Currently the bash install script fails on ubuntu bionic and focal docker images:

DOTNET_VERSION=3.1.403
DOTNET_INSTALL_DIR=/usr/local/dotnet/${DOTNET_VERSION}
curl -sfL https://dot.net/v1/dotnet-install.sh | bash -s - --version $DOTNET_VERSION --install-dir ${DOTNET_INSTALL_DIR}
#5 16.67 dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
#5 16.67 dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
#5 16.67 dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
#5 16.67 dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
#5 16.67
#5 17.70 dotnet-install: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.403/dotnet-sdk-3.1.403-linux-x64.tar.gz
#5 27.58 main: line 908: http_code: unbound variable

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@viceice
Copy link
Author

viceice commented Feb 5, 2021

verbose run: now with 3.1.405

#5 17.08 dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
#5 17.08 dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
#5 17.08 dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
#5 17.08
#5 17.08 dotnet-install: Calling: machine_has curl
#5 17.08 dotnet-install: Calling: calculate_vars
#5 17.08 dotnet-install: Calling: get_normalized_architecture_from_architecture <auto>
#5 17.08 dotnet-install: Calling: get_machine_architecture
#5 17.08 dotnet-install: Calling: get_normalized_architecture_from_architecture x64
#5 17.08 dotnet-install: normalized_architecture=x64
#5 17.08 dotnet-install: Calling: get_normalized_os
#5 17.09 dotnet-install: Calling: get_current_os_name
#5 17.09 dotnet-install: Calling: get_linux_platform_name
#5 17.09 dotnet-install: normalized_os=linux
#5 17.09 dotnet-install: Calling: get_specific_version_from_version https://dotnetcli.azureedge.net/dotnet LTS x64 3.1.405
#5 17.10 dotnet-install: Calling: get_specific_product_version https://dotnetcli.azureedge.net/dotnet 3.1.405
#5 17.10 dotnet-install: Calling: machine_has curl
#5 17.85 dotnet-install: specific_version=3.1.405
#5 17.85 dotnet-install: Calling: construct_download_link https://dotnetcli.azureedge.net/dotnet LTS x64 3.1.405 linux
#5 17.85 dotnet-install: Calling: get_specific_product_version https://dotnetcli.azureedge.net/dotnet 3.1.405
#5 17.85 dotnet-install: Calling: machine_has curl
#5 18.09 dotnet-install: Constructed primary named payload URL: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.405/dotnet-sdk-3.1.405-linux-x64.tar.gz
#5 18.09 dotnet-install: Calling: construct_legacy_download_link https://dotnetcli.azureedge.net/dotnet LTS x64 3.1.405
#5 18.09 dotnet-install: Calling: get_legacy_os_name
#5 18.09 dotnet-install: Calling: get_legacy_os_name_from_platform ubuntu.20.04
#5 18.09 dotnet-install: Distribution specific OS name and version could not be detected: UName = Linux
#5 18.10 dotnet-install: Cound not construct a legacy_download_link; omitting...
#5 18.10 dotnet-install: Calling: resolve_installation_path /usr/local/dotnet/3.1.405
#5 18.10 dotnet-install: InstallRoot: /usr/local/dotnet/3.1.405
#5 18.10 dotnet-install: Calling: install_dotnet
#5 18.10 dotnet-install: Calling: is_dotnet_package_installed /usr/local/dotnet/3.1.405 sdk 3.1.405
#5 18.10 dotnet-install: Calling: combine_paths /usr/local/dotnet/3.1.405 sdk
#5 18.10 dotnet-install: combine_paths: root_path=/usr/local/dotnet/3.1.405
#5 18.10 dotnet-install: combine_paths: child_path=sdk
#5 18.10 dotnet-install: Calling: combine_paths /usr/local/dotnet/3.1.405/sdk 3.1.405
#5 18.10 dotnet-install: combine_paths: root_path=/usr/local/dotnet/3.1.405/sdk
#5 18.10 dotnet-install: combine_paths: child_path=3.1.405
#5 18.10 dotnet-install: is_dotnet_package_installed: dotnet_package_path=/usr/local/dotnet/3.1.405/sdk/3.1.405
#5 18.10 dotnet-install: Zip path: /tmp/dotnet.LVMe9cJGe
#5 18.10 dotnet-install: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.405/dotnet-sdk-3.1.405-linux-x64.tar.gz
#5 18.10 dotnet-install: Calling: download https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.405/dotnet-sdk-3.1.405-linux-x64.tar.gz /tmp/dotnet.LVMe9cJGe
#5 18.10 dotnet-install: Calling: machine_has curl
#5 18.11 dotnet-install: Calling: downloadcurl https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.405/dotnet-sdk-3.1.405-linux-x64.tar.gz /tmp/dotnet.LVMe9cJGe
#5 28.00 main: line 908: http_code: unbound variable

@Youssef1313
Copy link
Member

Duplicate of dotnet/install-scripts#136.
The product team is already aware of the issue, and has made a fix, which may take a few hours to be published.

@viceice viceice closed this as completed Feb 5, 2021
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants