Missing juju agent binary on M1 macOS

HI, I am trying to setup Juju test environment on my (M1) MacBook Pro. I have some LXD machines, MAAS server, LXD’s are registered in MAAS. But when I try to bootstrap juju agent on MAAS (or LXD), I am receiving following error:

ERROR failed to bootstrap model: cannot use agent built for "focal" using a machine running "OSX"

It looks like juju agent (controller) doesn’t support Apple Silicon (yet). How can I build and provide the agent to the local juju binary, so it will pick up and install on target cloud?

1 Like

Can you clarify the version of the juju client you are using? Did you snap install it? The error message you are seeing implies that no suitable published agent binaries can be found for the controller so juju is attempting to use the jujud agent from the snap instead. The error is unfortunate because the fact that the client is macos and the agent binary from the snap was compiled for focal should not matter if the controller is being created on a focal server.

Can you raise a bug for this with the details of your setup.

If the juju client is version 2.9.28 or earlier, I would have expected this to work as there would have been a suitable published jujud to use.

@jas02, this is a long standing known issue.

Developing juju on anything other than ubuntu is a challenge as the correct agent binaries are not built for bootstrap. As a juju developer using a Mac I’ve tried to get this working at various points. The sticking point for me was that I couldn’t get juju to cross compile for ubuntu while on osx correctly. There were compile issues with LXD.

You can bootstrap a released version of juju from the Mac. E.G. juju bootstrap aws --agent-version 2.9.28.

@wallyworld the Mac client we release is done via brew and not snap. We should look at what gets installed with it, which jujud.


my local juju version:

juju --version


I was able to do bootstraping using Ubuntu VM and standard (snap provided) juju. It’s a workaround, but at least I didn’t get stuck.

@jas02, normally this would have worked. I think you got caught by an issue with our streams file in the 2.9.28 release process which has since been resolved. If you’d bootstrapped with aws, you wouldn’t have seen the issue.

juju was building an agent because it couldn’t find the correct ones in the streams.