This question already has an answer here:
Your current PHP memory limit is 128M. Magento 2 requires it to be set to 756M or more. As a user with root privileges, edit your php.ini file to increase memory_limit. (The command php --ini tells you where it is located.) After that, restart your web server and try again.
i am trying the above but its not working for me .can anyone help me how to solve this ?