Composer install: error on temporary file

2019-09-05 07:08发布

问题:

I have a problem with windows 10 and composer (last version). When I want to execute command "composer install" in my project, a symphony error is thrown:

[Symfony\Component\Process\Exception\RuntimeException]
A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable

My TEMP variable is "%USERPROFILE%\AppData\Local\Temp". The folder exists and permissions are good.

Can anyone help me to find the problem please?

Thank you.

回答1:

Look into php.ini file for location of sys_temp_dir and check rights for this folder.



回答2:

Also in order to clarify your TEMP directory run echo %TEMP%. Copy the output directory in terminal and paste it to sys_temp_dir in your php.ini exactly as it was said above.