'How to install a Julia package if it fails to install / build on an M1 Mac?

I am trying to use the Twitter.jl package locally on my M1 Mac. However, when I try to install it, I get:

ERROR: Error building `DecFP`: 
┌ Warning: Platform `arm64-apple-darwin21.2.0` is not an officially supported platform
└ @ BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:450
ERROR: LoadError: KeyError: key "unknown" not found

DecFP looks like it's an up to date Julia package so I am not sure what the issue would be in this case.

I would like to get a general set of steps to resolve issues like this since I know this package isn't the only one that will have installation issues so hopefully this can be used to help others who have similar issues.



Solution 1:[1]

The issue is that Twitter.jl is pulling an old version of OAuth.jl which doesn't work on the M1. I have opened a PR so it pulls a newer version and it should work. About these cases in general the steps are identifying what package is using BinaryProvider, in this case it's an old MbedTLS that was pulled by an old OAuth. The solutions are, if there is a newer version, change the compat bounds, and if there isn't then one has to build the needed binary using BinaryBuilder.jl and change the dependent packages to use it. In most cases just opening an issue in github should be enough :).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 giordano