Are you an Nginx server?
You can try configuration parameters to solve the problem, that's how I solved it.
Modify nginx configuration
In nginx.conf, set the following parameters to increase the timeout
http {
...
fastcgi_connect_timeout 3600;
fastcgi_send_timeout 3600;
fastcgi_read_timeout 3600;
...
}
fastcgi_connect_timeout
fastcgi connection timeout, default 60 seconds
fastcgi_send_timeout
The timeout for the nginx process to send a request to the fastcgi process, the default value is 60 seconds
fastcgi_read_timeout
The timeout for the fastcgi process to send the output process to the nginx process, the default value is 60 seconds
Finally, restart Nginx, reinstall PrestaShop, and after a long wait, the installation will be successful.