Intellij mvn build: ExecuteProcessError(errno=2, message=No such file or directory (os error 2))

已回答

Everything was working fine. I got an update on the Intellij community. Updated it, the project stopped building, says 

ExecuteProcessError(errno=2, message=No such file or directory (os error 2)) 

I am using windows 11 with WSL. 
IntelliJ Version: Build #IC-251.23774.435, built on April 14, 2025

Things I have tried:

1. Rebuild the project

2. Reload and Resync the Maven Projects

3. Checked configuration, working directory exists (working the same as a few minutes before the update), and SDK path is correct.

4. Tried running the command manually “mvn clean install”, working, but not via Maven Lifecycle Tasks.

Following are the intellij Logs

 

2025-04-29 15:30:06,882 [4461974]   INFO - #c.i.p.i.s.IjentSessionMediator - IjentId(ijent-0-wsl-Ubuntu) log: ijent_service::processes: error=(2, "No such file or directory (os error 2)")

2025-04-29 15:30:06,882 [4461974]   INFO - #c.i.e.r.ExecutionUtil - Error running 'ops-data-api [clean,install]':<br>ExecuteProcessError(errno=2, message=No such file or directory (os error 2))
java.lang.RuntimeException: ExecuteProcessError(errno=2, message=No such file or directory (os error 2))
    at com.intellij.execution.target.eel.EelTargetEnvironment$createProcess$2.invokeSuspend(EelTargetEnvironmentRequest.kt:302)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:112)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$BuildersKt__BuildersKt(Builders.kt:85)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlockingWithParallelismCompensation(Builders.kt:61)
    at kotlinx.coroutines.BuildersKt.runBlockingWithParallelismCompensation(Unknown Source)
    at kotlinx.coroutines.internal.intellij.IntellijCoroutines.runBlockingWithParallelismCompensation(intellij.kt:43)
    at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable$lambda$0(coroutines.kt:151)
    at com.intellij.openapi.progress.ContextKt.prepareIndicatorThreadContext$lambda$5(context.kt:108)
    at com.intellij.openapi.progress.impl.CoreProgressManager.silenceGlobalIndicator(CoreProgressManager.java:1048)
    at com.intellij.openapi.progress.ContextKt.prepareIndicatorThreadContext(context.kt:106)
    at com.intellij.openapi.progress.ContextKt.prepareThreadContext(context.kt:77)
    at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:144)
    at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:127)
    at com.intellij.execution.target.eel.EelTargetEnvironment.createProcess(EelTargetEnvironmentRequest.kt:284)
    at org.jetbrains.idea.maven.execution.run.MavenCommandLineState.startProcess(MavenCommandLineState.java:371)
    at org.jetbrains.idea.maven.execution.run.MavenCommandLineState.execute(MavenCommandLineState.java:235)
    at com.intellij.execution.impl.DefaultJavaProgramRunner.executeJavaState(DefaultJavaProgramRunner.java:186)
    at com.intellij.execution.impl.DefaultJavaProgramRunner.lambda$doExecuteAsync$5(DefaultJavaProgramRunner.java:170)
    at com.intellij.execution.target.TargetEnvironmentAwareRunProfileState$1.run(TargetEnvironmentAwareRunProfileState.java:58)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:497)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:118)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$7(CoreProgressManager.java:548)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:229)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:43)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:228)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:680)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:755)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:711)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:77)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:209)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:252)
    at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:513)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:478)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:102)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:102)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:108)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:102)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:474)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
    at java.base/java.lang.Thread.run(Thread.java:1583)
 

 

1
正式评论

Hi,

This appears to be a known issue:
https://youtrack.jetbrains.com/issue/IDEA-368924

We are actively working on a fix. For now, you can:

  • Install Maven directly on WSL and update the Maven path in your IntelliJ IDEA:
  1. Go to File | Settings | Build, Execution, Deployment | Build Tools | Maven.
  2. Set the Maven home path to your WSL-installed Maven location.
  • Alternatively, continue running Maven goals directly from the Terminal.

Please let me know if you encounter any other issues or have additional questions.

请先登录再写评论。