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.

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

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
xsoheilalizadehcommented, Mar 14, 2022
1reaction
wtgodbecommented, Mar 14, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lots of Killed: 9 compilation errors with an M1/Monterey
Once a build fails it takes an eternity to get it building successfully again, doing a clean, delete derived data, quit/re-launch Xcode doesn't...
Read more >
Configuring compilers on Apple silicon (Big Sur, Monterey ...
Currently (2023-04-14), CRAN builds R 4.3.x binaries for Apple silicon using Apple Clang from Command Line Tools for Xcode 14.2 and using an ......
Read more >
macOS install
Update your path. You can update your PATH variable for the current session at the command line, as shown in step 3 of...
Read more >
[Fixed] Mac Command Not Found Error in Terminal
Experiencing the 'command not found' error on M1 and Intel Mac? Here are the reasons behind and 4 ways to fix errors like...
Read more >
Can I initiate a MacOS restart to Recovery mode solely ...
You can do that using the following command: sudo nvram "recovery-boot-mode=unused" sudo reboot. This sets a firmware variable in nvram ...
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