I'm on Debian and my PHP version is 7.0.27.
First I began installing Composer using curl -sS https://getcomposer.org/installer | php
and then sudo mv composer.phar /usr/local/composer
(sudo because that's outside of my home directory). Then I typed composer
and it executed correctly.
Then I launched my XAMPP Apache server and I went to the /opt/lampp/htdocs folder. There I typed the command sudo composer create-project laravel/laravel myproject
(again, sudo because that's outside of my home directory, but it throwed an alert : "Do not run Composer as root/super user! See https://getcomposer.org/root for details").
But then I got this error :
Your requirements could not be resolved to an installable set of packages.
and it printed a bunch of problems.
What did I do wrong?
Thank you for your help.
EDIT1: I must specify that the myproject
folder was created nonetheless, but when I got to http://localhost/myproject/public it printed a PHP error :
Warning: require(/opt/lampp/htdocs/myproject/public/../vendor/autoload.php): failed to open stream: Aucun fichier ou dossier de ce type in /opt/lampp/htdocs/myproject/public/index.php on line 24
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/myproject/public/../vendor/autoload.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/myproject/public/index.php on line 24