java.lang.UnsatisfiedlinkError: /private/var/folders/87/m7hnd9f168g6qrwmytg9xlnw0000gn/T/jffi8824640721005058193.dylib: dlopen(/private/var/folders/87/m7hnd9f168g6qrwmytg9xlnw0000gn/T/jffi8824640721005058193.dylib, 0x0001): tried: '/private/var/folders/87/m7hnd9f168g6qrwmytg9xlnw0000gn/T/jffi8824640721005058193.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jffi8824640721005058193.dylib' (no such file) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832) at java.lang.Runtime.load0(Runtime.java:811) at java.lang.System.load(System.java:1088) at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:371) at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:258) at com.kenai.jffi.internal.StubLoader.解决办法(StubLoader.java:444) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at com.kenai.jffi.Init.load(Init.java:68) at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49) at com.kenai.jffi.Foreign$InstanceHolder. (Foreign.java:45) at com.kenai.jffi.Foreign.getInstance(Foreign.java:103) at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242) at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237) at com.kenai.jffi.Type.resolveSize(Type.java:155) at com.kenai.jffi.Type.size(Type.java:138) at com.spotify.docker.client.shaded.jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:187) at com.spotify.docker.client.shaded.jnr.ffi.provider.AbstractRuntime. (AbstractRuntime.java:48) at com.spotify.docker.client.shaded.jnr.ffi.provider.jffi.NativeRuntime. (NativeRuntime.java:66) at com.spotify.docker.client.shaded.jnr.ffi.provider.jffi.NativeRuntime. (NativeRuntime.java:41) at com.spotify.docker.client.shaded.jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder. (NativeRuntime.java:62) at com.spotify.docker.client.shaded.jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:58) at com.spotify.docker.client.shaded.jnr.ffi.provider.jffi.Provider. (Provider.java:29) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at com.spotify.docker.client.shaded.jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68) at com.spotify.docker.client.shaded.jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder. (FFIProvider.java:57) at com.spotify.docker.client.shaded.jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35) at com.spotify.docker.client.shaded.jnr.ffi.LibraryLoader.create(LibraryLoader.java:73) at com.spotify.docker.client.shaded.jnr.unixsocket.Native. (Native.java:76) at com.spotify.docker.client.shaded.jnr.unixsocket.UnixSocketChannel. (UnixSocketChannel.java:101) at com.spotify.docker.client.shaded.jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:60) at com.spotify.docker.client.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:69) at com.spotify.docker.client.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:44) at com.spotify.docker.client.shaded.org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:118) at com.spotify.docker.client.shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at com.spotify.docker.client.shaded.org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at com.spotify.docker.client.shaded.org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:435) at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37) at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:487) at com.spotify.docker.client.shaded.org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:178) at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process(Errors.java:315) at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process(Errors.java:297) at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process(Errors.java:267) at com.spotify.docker.client.shaded.org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340) at com.spotify.docker.client.shaded.org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
brew install socat # 安装socat nohup socat TCP-LISTEN:2375,range=127.0.0.1/32,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock &> /dev/null & # 将 unix socket 代理到 tcp 端口 export DOCKER_HOST=tcp://127.0.0.1:2375 # 设置环境变量原因分析
Docker 在本地一般使用 unix socket 和 Docker daemon 交互,可能 dockerfile-maven-plugin 所引用的库还没支持 macOS aarch64,无法使用 unix socket,导致在 macOS aarch64 使用 dockerfile-maven-plugin 构建镜像报错
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)