-
Notifications
You must be signed in to change notification settings - Fork 373
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
can not start for mac, #127
Comments
+1 |
1 similar comment
+1 |
I think it's a big sur system problem, please give up |
Seems the embedded redis binary isn't m1 and doesn't work with rosetta |
do you want say apple's arm64?? |
Apple M1 runs Mach-O 64-bit executable arm64 natively, yes. |
just want say,the apple m1 is terrible,just like bull shit....hope the laste version can be change it |
Hello! So here is what you need to do to make embedded redis working:
|
I moved to using a TestContainer which can pull the docker image that has all architectures. |
Update your Mac OS Bigsur to MontereyBefore you try trying the @mmazurovsky 's solution, update your OS if you're using Still error?Try @mmazurovsky 's solution. It's working well on Bigsur.
@TestConfiguration
public class TestRedisConfig {
private RedisServer redisServer;
@PostConstruct
public void setUp() throws IOException {
final int redisDefaultPort = 6379;
this.redisServer = getRedisServer(redisDefaultPort);
redisServer.start();
}
@PreDestroy
public void stopRedis() {
if (Objects.nonNull(redisServer) && redisServer.isActive()) {
redisServer.stop();
}
}
private RedisServer getRedisServer(int port) throws IOException {
if (isMacM1()) {
return new RedisServer(
RedisExecProvider.defaultProvider()
.override(OS.MAC_OS_X, Architecture.x86_64, "binary/redis-server"),
redisPort);
} else {
return new RedisServer(redisPort);
}
}
private boolean isMacM1() {
if (!System.getProperty("os.name").equals("Mac OS X")) {
return false;
}
return System.getProperty("os.arch").equals("aarch64") || System.getProperty("os.arch").equals("x86_64");
}
} |
This comment #135 (comment) |
Rosetta 2 support the Mach-0 x64 binary and starts it without problems under M2 Mac, still, using Testcontainers should be (imo) the better/preferred option. |
can not start for mac
os version: mac os big sur 11.4
but when start in mac os catalina is ok。
is this the problem with m1 cpu or mac os ?
The text was updated successfully, but these errors were encountered: