laravel 4 install issue when using composer install

China☆狼群 提交于 2019-12-11 01:36:11

问题


When I run

composer.phar install

I get this error almost at the end of the installation, any ideas?

Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Generating autoload files

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/belendez/public_html/laravel/artisan on line 46

Parse error: syntax error, unexpected T_STRING in /home/belendez/public_html/laravel/artisan on line 46 Script php artisan optimize handling the post-install-cmd event returned with an error

I look into the suggested link and it appears that somehow in the middle of the installation it changes from 5.3 to 5.2! If I try to start installation using 5.2 it returns right a way: class 'Phar' not found. Any ideas?


回答1:


It seems that issuing only a php command will pick up another version of the interpreter. Try to change all the references to php in your composer.phar file to the one you want actually to be executed (in your case it seems /opt/php53/bin/php).

You can confirm that by simply launching a php -v directly from the command line to see what version your server will pick up



来源:https://stackoverflow.com/questions/16995549/laravel-4-install-issue-when-using-composer-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!