0

presciso de ajuda quando tento executar o comando bin/magento setup:upgrade no meu terminal aparece isso bin/magento: No such file or directory

I need help when I run the command bin / Magento setup: update on my terminal it shows bin / Magento: There is no such file or directory

9
  • Muito provável vc não está na raiz do seu site para rodar o comando. You are most likely not in the root directory. Have you found your root? Qual versão php? Which php version? Você pode precisar usar o php cli. It may be a case of php cli Aug 23, 2021 at 2:12
  • olha começei agora pouco com magento estou tentando descobrir coisas por conta prorpia sem curso nem nada, enfim, eu estou apenas abrindo o terminal e executando este comando acho que nao é so abrir o terminal, caso puder me ajudar iria ficar muito grato
    – Felps Dev
    Aug 25, 2021 at 11:33
  • eu estou a dar o seguinte comando php bin/home setup:upgrade e agora aparece o seguinte error Could not open input file: bin/home
    – Felps Dev
    Aug 25, 2021 at 11:46
  • acho q minha pasta raiz esta com o nome vazio estou usando este comando php bin/ setup:upgrade mas nao acontece nada, nao aparece nenhum erro, sim o meu php esta certo, instalado corretamente
    – Felps Dev
    Aug 25, 2021 at 12:01
  • We shall use in English here. So... I have posted an answer below. Aug 25, 2021 at 13:42

2 Answers 2

0

These are the two most common issues. You may face one of them right now.

1. File existence and permissions

If it exists, check the permissions of the file:

stat bin/magento

Verify that the following conditions are met:

  1. The owner of the file is the current user or a group that your user has
  2. The file has executed permissions for the user or group that matches your user/group. If necessary fix the permissions using chmod.

2. Ensure php is installed

Ensure that PHP is installed on your system and your user has the permissions to execute it. Also, the location of your PHP binary should be in the PATH.

You can check that by running PHP --version. It should print out the current version of PHP you have installed on the system:

  1. If the output is your installed PHP version, then it is fine.
  2. If the output is command not found, you either have PHP not installed or the PHP executable is not in your PATH.
  3. If you get permission denied, your user does not have the permission to execute the PHP binary.
3
  • olha começei agora pouco com magento estou tentando descobrir coisas por conta prorpia sem curso nem nada, enfim, eu estou apenas abrindo o terminal e executando este comando acho que nao é so abrir o terminal, caso puder me ajudar iria ficar muito grato
    – Felps Dev
    Aug 25, 2021 at 11:34
  • eu estou a dar o seguinte comando php bin/home setup:upgrade e agora aparece o seguinte error Could not open input file: bin/home
    – Felps Dev
    Aug 25, 2021 at 11:46
  • acho q minha pasta raiz esta com o nome vazio estou usando este comando php bin/ setup:upgrade mas nao acontece nada, nao aparece nenhum erro, sim o meu php esta certo, instalado corretamente
    – Felps Dev
    Aug 25, 2021 at 12:01
0

Seems that you aren't running the commands on the root directory.

1st and foremost you need to find the root directory where the PHP command will run.

It may vary according to your PHP configuration. For example, in my case, I am using Magento 2.35 and PHP 7.3. My commands are

  1. cd public_html, to enter in my current root directory
  2. /opt/alt/php73/usr/bin/php -d memory_limit=-1 bin/magento setup:upgrade

where:

  1. /opt/alt/php73/usr/bin/php is for cli php 7.3
  2. memory_limit=-1 is for using all the memory available for the command
  3. bin/magento setup:upgrade, as you need

It is not easy to find the root and commands. If you are not familiar, you may ask your developer to find it or hire someone.

There are some people sharing means to get it on Google as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.