Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memongo doesn't work Apple M1 Silicon #16

Open
anuj-kumar opened this issue Dec 24, 2021 · 1 comment
Open

Memongo doesn't work Apple M1 Silicon #16

anuj-kumar opened this issue Dec 24, 2021 · 1 comment

Comments

@anuj-kumar
Copy link

I'm trying to use memongo for application testing on Apple M1 chipset. On running the test, it throws the following error:

panic: memongo does not support automatic downloading on your system: your architecture, arm64, is not supported
anuj ~> go version
go version go1.17.5 darwin/arm64
@shlomi-dr
Copy link

shlomi-dr commented Mar 23, 2022

Two things:

  1. This can be solved by specifying the download URL when running on M1:
opts := &memongo.Options{
	MongoVersion: "5.0.0",
}
if runtime.GOARCH == "arm64" {
	if runtime.GOOS == "darwin" {
		// Only set the custom url as workaround for arm64 macs
		opts.DownloadURL = "https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-5.0.0.tgz"
	}
}
mongoServer, err := memongo.StartWithOptions(opts)
  1. Notice that this repo is no longer active, see New maintained memongo repository (CHECK ISSUE FOR INFO) #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants