【問題】/usr/bin/env: php: 沒有那個文件或目錄


php不是默認安裝的,在使用symfony創建新項目時,出現這個提示。

[root@localhost html]# symfony demo
/usr/bin/env: php: 沒有那個文件或目錄

 

解決方法是新增加一個php的軟鏈接,指向到/usr/local/bin目錄下。下面以我服務器上的demo舉例:

[root@localhost bin]# ln -s /app/php/bin/php /usr/local/bin/php

再次執行 symfony demo就正常了。

[root@localhost html]# symfony demo

 Downloading the Symfony Demo Application...

    6.21 MB/6.21 MB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓  100%

 Preparing project...

 ✔  Symfony Demo Application was successfully installed. Now you can:

    1. Change your current directory to /app/nginx/html/symfony_demo

    2. Execute the php app/console server:run command to run the demo application.

    3. Browse to the http://localhost:8000 URL to see the demo application in action.

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM