1. I faced the same error message due to one space in parameter.
2. Probably, you faced this issue due to 127.0.0.1 as bas-url. Magento 2 does not work on the top-level domains like localhost or 127.0.0.1. What happen if you would use any vhost?
This can be a problem with the SSH commandline.
Check if the command is correctly parsed by PHP.
Check if all quotes are correctly.
If you copy-past it from a website, the " " signs might be wrong. Replace them on the command line. Also check this with single quotes ' '
Also check it with single or double - (minus) signs.
Remove backslashes \ from the Magento install command line, for example I successfully ran the following command as root ....
./magento setup:install --base-url=http://localhost/magento2/ --db-host=localhost --db-name=mymagentodb --db-user=magentoadmin --db-password=magentopassword --admin-firstname=Magento --admin-lastname=Admin --firstname.lastname@example.org --admin-user=admin --admin-password=MySecretPassword --language=en_US --currency=CAD --timezone=America/Toronto --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host=servername.example.com --elasticsearch-port=9200
Doubt this is the issue, however, the minimum requirements for PHP is 7.4. Might be worth upgrading and trying again.
'You can run the installer multiple times with different options to complete installation'
I managed to resolve this issue by running the cmds in stages, this allowed me to identify the problematic cmd.
My issue was resolved by putting my passwords in single quotes: '<myPassword>' (don't think it liked the '!' character.
Thank you for your advice. Removing the backslashes was the problem for me with this error: too many arguments expected arguments command.
The solution was easy for me on CentOS 8 / PHP 7.4.1: Get rid of the equals signs between the parameter names and parameter values. As soon as I did this everything worked fine.
php magento setup:install --base-url "http://127.0.0.1/magento2/" \
--db-host "localhost" \
--db-name "magento" \
--db-user "magento" \
--db-password "magento" \
--admin-firstname "martin" \
--admin-user "admin" \
--admin-password "martin99" \
--admin-email "email@example.com" \
-–language "de_AT" \
--currency "EUR" \
--timezone "Europe/Vienna" \
--session-save "db" \