I get the following error when running mvn on OS X Mavericks: Cannot start the program "/ bin / sh": error = 2, There is no such file or directory

I am running OS X Mavericks on a MacBook Pro.

I have maven 3.0.5 installed.

When I start mvn, I get the following error message.

Error while executing process. Cannot run program "/bin/sh": error-2, No such file or directory

And before you ask:

PATH="/usr/local/apache-maven-3.0.5/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin:/usr/local/bin:/bin:/usr/bin"

M2_HOME="/usr/local/apache-maven-3.0.5"

M2="/usr/local/apache-maven-3.0.5/bin"

MAVEN_OPTS="-Xms256m -Xmx768m -XX:MaxPermSize=512m"

I also see the following at the beginning of mvn output: [WARNING] Some problems occurred while creating effective settings

[WARNING] Failed to use environment variables for interpolation: Cannot run program "env": error=0, spawn failed @ 
+4
source share
3 answers

I had the same problem: exec () failed to execute with any executable. Finally remembered that I was using a private jre. This jre was a copy of the original, only with bin / java installed as an executable.

I made the lib / jspawnhelper executable and it will work!

+8

, "sh", script.

Mac OSX :

/bin/zsh
/bin/ksh
/bin/tcsh
/bin/bash
/bin/sh

, "/bin/sh" , "/bin/ bash", .

:

  • , "/bin/sh"
  • , , ,

, , . , mvn.

, ;)

0

eclipse, java. point java Java- Java jcl eclipse.

0

All Articles