aspnetcore: Command-line build fails on Apple M1 silicon during the `restore.sh` step

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Step 3 from the Build ASP.NET Core from Source guide fails on Apple M1 silicon.

When I run ./restore.sh I get several errors that look like the one pasted below:

Unknown CPU arm64 detected, treating it as x64
Attempting to install dotnet from public_location.
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
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.

dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Runtime/2.1.30/dotnet-runtime-2.1.30-osx-arm64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetcli.azureedge.net/dotnet/Runtime/2.1.30/dotnet-runtime-2.1.30-osx-arm64.tar.gz' is not available.
dotnet-install: Attempting to download using legacy link https://dotnetcli.azureedge.net/dotnet/Runtime/2.1.30/dotnet-osx-arm64.2.1.30.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at legacy link 'https://dotnetcli.azureedge.net/dotnet/Runtime/2.1.30/dotnet-osx-arm64.2.1.30.tar.gz' is not available.
dotnet-install: Attempting to download using primary link https://dotnetbuilds.azureedge.net/public/Runtime/2.1.30/dotnet-runtime-2.1.30-osx-arm64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetbuilds.azureedge.net/public/Runtime/2.1.30/dotnet-runtime-2.1.30-osx-arm64.tar.gz' is not available.
dotnet-install: Attempting to download using legacy link https://dotnetbuilds.azureedge.net/public/Runtime/2.1.30/dotnet-osx-arm64.2.1.30.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at legacy link 'https://dotnetbuilds.azureedge.net/public/Runtime/2.1.30/dotnet-osx-arm64.2.1.30.tar.gz' is not available.
dotnet_install: Error: Could not find `.NET Core Runtime` with version = 2.1.30
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

The run ends with this error:

Build failed with exit code 1. Check errors above.

Full log is attached. restore-log-errors.txt

Expected Behavior

./restore.sh is expected to run without errors.

Steps To Reproduce

  • On Mac OS with Apple M1 Pro, follow steps 0…2 (getting the source code and installing prerequisites).
  • Once you successfully complete all these steps, run ./restore.sh

Exceptions (if any)

No response

.NET Version

7.0.100-preview.2.22103.2

Anything else?

dotnet --info .NET SDK (reflecting any global.json): Version: 7.0.100-preview.2.22103.2 Commit: 22b9143420

Runtime Environment: OS Name: Mac OS X OS Version: 12.1 OS Platform: Darwin RID: osx.12-arm64 Base Path: /Users/sergey/aspnetcore/.dotnet/sdk/7.0.100-preview.2.22103.2/

Host (useful for support): Version: 7.0.0-preview.2.22103.2 Commit: 0ae04e5b33

.NET SDKs installed: 7.0.100-preview.2.22103.2 [/Users/sergey/aspnetcore/.dotnet/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 7.0.0-preview.2.22102.20 [/Users/sergey/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.0-preview.2.22102.1 [/Users/sergey/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-preview.2.22103.2 [/Users/sergey/aspnetcore/.dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 33 (26 by maintainers)

Most upvoted comments

Thank you for the PR, but that file is centrally managed & shared by many dotnet repos - @omajid will handle making the centralized fix

@xsoheilalizadeh Yes, that would be great!