question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Amazon linux cannot be detected by install script

See original GitHub issue

Steps to reproduce

  1. Spawn an elastic beanstalk instance with Amazon Linux. Current version is “64bit Amazon Linux 2017.03”.
  2. wget https://dot.net/v1/dotnet-install.sh
  3. bash dotnet-install.sh --verbose

Expected behavior

Install is successful

Actual behavior

Install fails. Verbose output:

dotnet-install: Calling: machine_has curl
dotnet-install: Calling: calculate_vars 
dotnet-install: Calling: get_normalized_architecture_from_architecture <auto>
dotnet-install: Calling: get_machine_architecture 
dotnet-install: Calling: get_normalized_architecture_from_architecture x64
dotnet-install: normalized_architecture=x64
dotnet-install: Calling: get_specific_version_from_version https://dotnetcli.azureedge.net/dotnet LTS x64 Latest
dotnet-install: Calling: get_latest_version_info https://dotnetcli.azureedge.net/dotnet LTS x64 false
dotnet-install: get_latest_version_info: latest url: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/LTS/latest.version
dotnet-install: Calling: download https://dotnetcli.blob.core.windows.net/dotnet/Sdk/LTS/latest.version
dotnet-install: Calling: machine_has curl
dotnet-install: Calling: downloadcurl https://dotnetcli.blob.core.windows.net/dotnet/Sdk/LTS/latest.version
dotnet-install: get_specific_version_from_version: version_info=af1e6684fd694616ec5070e1d05a7b501a98783f
1.0.4
dotnet-install: Calling: get_version_from_version_info 
dotnet-install: specific_version=1.0.4
dotnet-install: Calling: construct_download_link https://dotnetcli.azureedge.net/dotnet LTS x64 1.0.4
dotnet-install: Calling: get_current_os_name 
dotnet-install: Calling: get_distro_specific_os_name 
dotnet-install: Calling: get_os_download_name_from_platform amzn.2017.03
dotnet-install: Distribution specific OS name and version could not be detected: amzn.2017.03

Environment data

dotnet --info output: Irrevelant as the issue is with the install script

Same issue happens when specifying --version 2.0.0 or --shared-runtime. Can be worked around by specifying runtime as --runtime-id rhel.7.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
johnbeisnercommented, Oct 13, 2017

@Nezz @omajid @khyperia The https://dot.net/v1/dotnet-install.sh public location has been updated with this fix.

0reactions
khyperiacommented, Oct 13, 2017

Can someone try out a fix to this: https://raw.githubusercontent.com/johnbeisner/cli/UpdateInstallScriptSH/scripts/obtain/dotnet-install.sh

It still prints out the following errors, but it successfully installs.

./dotnet-install.sh: line 123: VERSION_ID: unbound variable
./dotnet-install.sh: line 175: VERSION_ID: unbound variable
./dotnet-install.sh: line 183: VERSION_ID: unbound variable

Full verbose log:

Click to expand

./dotnet-install.sh --version 2.0.0 --install-dir $HOME/tmp --verbose
dotnet-install: Calling: machine_has curl
dotnet-install: Calling: calculate_vars
dotnet-install: Calling: get_normalized_architecture_from_architecture <auto>
dotnet-install: Calling: get_machine_architecture
dotnet-install: Calling: get_normalized_architecture_from_architecture x64
dotnet-install: normalized_architecture=x64
dotnet-install: Calling: get_specific_version_from_version https://dotnetcli.azureedge.net/dotnet LTS x64 2.0.0
dotnet-install: specific_version=2.0.0
dotnet-install: Calling: construct_download_link https://dotnetcli.azureedge.net/dotnet LTS x64 2.0.0
dotnet-install: Calling: get_current_os_name
dotnet-install: Calling: get_linux_platform_name
./dotnet-install.sh: line 123: VERSION_ID: unbound variable
dotnet-install: download_link=https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.0/dotnet-sdk-2.0.0-linux-x64.tar.gz
dotnet-install: Calling: construct_legacy_download_link https://dotnetcli.azureedge.net/dotnet LTS x64 2.0.0
dotnet-install: Calling: get_legacy_os_name
./dotnet-install.sh: line 175: VERSION_ID: unbound variable
./dotnet-install.sh: line 183: VERSION_ID: unbound variable
dotnet-install: Cound not construct a legacy_download_link; omitting...
dotnet-install: Calling: resolve_installation_path /home/khyperia/tmp
dotnet-install: install_root=/home/khyperia/tmp
dotnet-install: Calling: check_pre_reqs
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
dotnet-install: Calling: install_dotnet
dotnet-install: Calling: is_dotnet_package_installed /home/khyperia/tmp sdk 2.0.0
dotnet-install: Calling: combine_paths /home/khyperia/tmp sdk
dotnet-install: combine_paths: root_path=/home/khyperia/tmp
dotnet-install: combine_paths: child_path=sdk
dotnet-install: Calling: combine_paths /home/khyperia/tmp/sdk 2.0.0
dotnet-install: combine_paths: root_path=/home/khyperia/tmp/sdk
dotnet-install: combine_paths: child_path=2.0.0
dotnet-install: is_dotnet_package_installed: dotnet_package_path=/home/khyperia/tmp/sdk/2.0.0
dotnet-install: .NET SDK version 2.0.0 is already installed.
dotnet-install: Calling: combine_paths /home/khyperia/tmp
dotnet-install: combine_paths: root_path=/home/khyperia/tmp
dotnet-install: combine_paths: child_path=
dotnet-install: Calling: get_absolute_path /home/khyperia/tmp/
dotnet-install: Adding to current process PATH: `/home/khyperia/tmp`. Note: This change will be visible only when sourcing script.
dotnet-install: Installation finished successfully.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install, Update, and Uninstall the AWS CLI version 1 on Linux
The following steps enable you to install the AWS CLI version 1 from the command line on any build of Linux or macOS....
Read more >
Troubleshoot AWS CLI errors - AWS Command Line Interface
This error means that the operating system can't find the AWS CLI command. The installation might be incomplete or requires updating. Possible ...
Read more >
Run commands on your Linux instance at launch
Pass user data to an Amazon Linux instance at launch time.
Read more >
Troubleshoot connecting to your instance - AWS Documentation
The script is located at /opt/aws/bin/ on Amazon Linux 2 instances, and at /usr/share/ec2-instance-connect/ on Ubuntu instances.
Read more >
Server Install on Amazon Linux AMI - Can't Generate Script
I am a commercial user of OpenVPN AS but I ran into this problem today and believe I found the solution. The problem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found