Cpanel Laravel 软件包安装被“杀死”

Posted

技术标签:

【中文标题】Cpanel Laravel 软件包安装被“杀死”【英文标题】:Cpanel Laravel package install getting "Killed" 【发布时间】:2020-11-13 00:14:52 【问题描述】:

我正在尝试在我的 cpanel laravel 项目中安装条形码包。但每次它都会被杀死。

命令:

[......@host public_html]$ composer require milon/barcode

片刻之后:

Using version ^7.0 for milon/barcode
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://repo.packagist.org/p/symfony/polyfill-iconv%24535e139d88ce6708c9d8bf795da669c3fe46467f4bc7dc900e2e65a8d77b56ae.json" file could not be downloaded: failed to open stream: Network is unreachable
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Killed

我想安装的所有软件包也都会发生这种情况:pdf 或其他。更新了我的作曲家。仍然无法正常工作。

【问题讨论】:

The "Killed" message usually means your process consumed too much memory, so you may simply need to add more memory to your system if possible. i copy from this response 这能回答你的问题吗? Composer killed while updating 一般来说,你应该避免在你的服务器上运行composer require。在可能使用更多内存的开发系统上运行它 那么我的命令应该是什么?没有作曲家需要@NicoHaase 你需要composer require来安装一个新的包,但你不应该在任何外部服务器上运行它 【参考方案1】:

这是因为您的服务器内存不足。您可以在本地机器上安装软件包,然后用本地的 composer.lock 文件替换您的服务器 composer.lock 文件然后转到 终端并运行 composer update

【讨论】:

以上是关于Cpanel Laravel 软件包安装被“杀死”的主要内容,如果未能解决你的问题,请参考以下文章

Cpanel 共享主机上的 Laravel

点安装 - 杀死

使用 cPanel 和 Laravel 将电子邮件发送到程序

Cpanel 共享主机中的 Laravel 5.5 错误 500

Laravel 项目临时访问需要 cPanel 名称

将 laravel 项目部署到 Cpanel 时如何解决错误 404?