Can you tell if “bash: No such file or directory” has the same root cause as “gradle[158]: syntax error at line 158 : (’ unexpected”, or if it does not find the ‘gradle’ script in the first place? Does ‘cat gradle’ work? Are execute permissions set correctly?
I still get this error when I try to run gradle on AIX
gradle -version /home/pradeep9/source/src/powersc/ts/gradle/gradle-1.5/bin/gradle: line 65: pwd: write error: A file descriptor does not refer to an open file. /home/pradeep9/source/src/powersc/ts/gradle/gradle-1.5/bin/gradle: line 23: echo: write error: A file descriptor does not refer to an open file.
it seems to be an issue with older versions of bash under AIX. I’ve tested gradle and gradlew from version 1.8 and 1.10 and each of them fails under AIX. It looks like as if the bash does not like it if STDOUT is closed before it was opened ( >&- ). The script works perfectly under AIX as soon as I remove the string “>&-” at lines 64 and 66.
Maybe someone could clarify why it is really necessary to close STDOUT at those lines.