Magento install composer #6 install error

hey I follow you all along, thanks for the tutorial, however, I got trouble in composing magento here the pict

Looks like you missed a step between magento su and composer.... You need to delete the contents of /var/www/html before executing the composer command.

Remove files with rm composer.json .gitignore
Remove folder with rm -rf update

thank you so much, but I have another problem after that. what should I do
.

Looks like you’ve not installed the required prerequisites to install Magento 2. Checkout this article I wrote - It shows you How to install PHP and any extensions needed for Magento 2.

yes I have already fixed my problem, and successfully download magento 2 and installed on ubuntu server… but when I typed my ip address 500 error occurred, what is the missing

Put Magento in Developer mode and refresh the page to view the Error. Run this in Magento root:

bin/magento deploy:mode:set developer

Chances are that a PHP Mod isn’t enabled. Error 500s are pretty easy to diagnose.

Ok - So, I just ran into the issue myself whilst doing some experimenting. It’s super-simple to resolve.

In my scenario: I had already installed PHP 7.0 on my server (force of habit). But I then went ahead and installed PHP 7.2. This was before trying to run the Web Setup Wizard. That’s when I came across your issue.

I created a phpinfo.php file in my /var/www/html/ directory so that I could see what was going on in more detail. This is the first thing I normally do when running into issue whilst setting up a LAMP stack.

Well, it turns out that despite installing 7.2 over 7.0, I still needed to tell apache which version to use. In order to do this, just run the following 3 commands (on after the other):

  1. sudo a2dismod php7.0 (Disable PHP 7.0)
  2. sudo a2enmod php7.2 (Enable PHP 7.2)
  3. sudo systemctl restart apache2 (Restart apache for changes to take effect)

Even I learn something new every day :+1:

Also…
Another way of running into this issue is because of the file permissions. I was also able to reproduce this issue by trying to access Web Setup Wizard before running the following commands from /var/www/html/:

  • find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
  • find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
  • chown -R :www-data .
  • chmod u+x bin/magento