diff --git a/src/Composer/Compiler.php b/src/Composer/Compiler.php
index a31aff946..8398862a1 100644
--- a/src/Composer/Compiler.php
+++ b/src/Composer/Compiler.php
@@ -260,7 +260,7 @@ private function stripWhitespace($source)
     private function getStub()
     {
         $stub = <<<'EOF'
-#!/usr/bin/env php
+#!@TERMUX_PREFIX@/bin/env php
 <?php
 /*
  * This file is part of Composer.