繁体   English   中英

Laravel 安装程序用完 Memory

[英]Laravel Installer Running Out of Memory

不久前,我让作曲家在我的笔记本电脑上工作,但我非常坚持将它安装在我的主计算机上。 我已经下载了最新版本的 Composer (1.10.8) 并在 Windows 机器上使用 Cygwin。 运行“composer global require laravel/installer”时出现问题,因为它一直用完 memory。 I have the PHP memory limit currently set at 8GB (which should be way more than enough) and yet it keeps saying it's running out of memory at the exact same place as it did with my memory limit at 128M, or 1024M, or 2048M:我什至尝试了以下命令并得到以下结果:

$ php -d memory_limit=-1 /usr/local/bin/composer global require laravel/installer
Changed current directory to /home/User/.composer

PHP Fatal error:  Out of memory (allocated 38273024) (tried to allocate 2102411 bytes) in phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php on line 462

Fatal error: Out of memory (allocated 38273024) (tried to allocate 2102411 bytes) in phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php on line 462

我不确定现在该怎么做,因为网上到处都在告诉我增加我的 memory 限制,但即使没有 memory 限制,output 也是一样的。 我应该怎么办?

尝试使用 x64 版本的 PHP。

要使用 PHP x64 的本地副本运行 composer,您可以执行以下操作:

Download the zip file from here (VC15 x64 Thread Safe version): https://windows.php.net/download Unzip the file Copy php.ini-development and rename to php.ini Uncomment the extension_dir = "ext" line and any您将需要的其他 php 扩展(例如 extension=gd2 或 extension=openssl)。 如果更新需要任何其他 PHP 扩展,那么它会在运行命令时告诉您。 工作命令:

"C:\path\to\php-7.2.23-Win32-VC15-x64\php.exe" -d memory_limit=-1 "C:/path/to/composer.phar" update

来源: https://ourcodeworld.com/articles/read/816/how-to-solve-composer-install-update-error-virtualalloc-failed-0x00000008

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM