简体   繁体   English

无法在 yii2 中运行“composer install”mongosoft/yii2-soap-server

[英]Unable to run “composer install” mongosoft/yii2-soap-server in yii2

I am trying to install a new widget but I am getting error.我正在尝试安装新的小部件,但出现错误。 I need help with getting a solution.我需要帮助来获得解决方案。

在此处输入图像描述

composer.json作曲家.json

{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "framework", "advanced", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">= 5.6.28",
        "yiisoft/yii2": ">=2.0.6",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-twig": "^2.0",
        "mdmsoft/yii2-admin": "~2.0",
        "nterms/yii2-pagesize-widget": "*",
        "kartik-v/yii2-grid": "@dev",
        "kartik-v/yii2-widgets": "*",
        "2amigos/yii2-ckeditor-widget": "^2.1",
        "2amigos/yii2-tinymce-widget": "~1.1",
        "michelf/php-smartypants": "dev-lib",
        "kartik-v/yii2-markdown": "1.3.0",
        "cinghie/yii2-articles": "*",
        "xj/yii2-uploadify-widget": "*",
        "yiisoft/yii2-redis": "^2.0",
        "kartik-v/yii2-detail-view": "*",
        "zxbodya/yii2-gallery-manager": "*@dev",
        "kartik-v/yii2-checkbox-x": "*",
        "kartik-v/yii2-date-range": "*",
        "kartik-v/yii2-tabs-x": "*",
        "kartik-v/yii2-datecontrol": "dev-master",
        "kartik-v/yii2-builder": "@dev",
        "nickcv/yii2-encrypter": "*",
        "mongosoft/yii2-soap-server": "*",
        "2amigos/yii2-file-upload-widget": "~1.0",
        "limion/yii2-jquery-fileupload-widget": "~1.0",
        "wadeshuler/yii2-ckeditor-cdn": "~1.0",
        "life2016/yii2-tagsinput": "*",
        "sunhater/kcfinder": "dev-master"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"
    },
    "config": {
        "process-timeout": 1800
    },
    "extra": {
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}

I have already looked into some solutions but none of them have worked.我已经研究了一些解决方案,但没有一个有效。 I am stuck at this from hours and I am getting nothing in result.我从几个小时就被困在这个问题上,我没有得到任何结果。 How can I solve this issue?我该如何解决这个问题?

It looks like your php is installed without SOAP extension which is required by mongosoft/yii2-soap-server .看起来您的 php 没有安装mongosoft/yii2-soap-server所需的SOAP 扩展名

The best way to deal with it is to add the extension to your installation but the way how to do it depends on how you've installed the php itself.处理它的最佳方法是将扩展添加到您的安装中,但如何做到这一点取决于您如何安装 php 本身。

If you've compilled the php from source code you should recompile it while adding --enable-soap switch to the configure command.如果您已经从源代码编译了 php,您应该在configure命令中添加--enable-soap开关时重新编译它。

If you've installed php from system's package repository try looking for a package with name like php-soap , php7.4-soap or something similar.如果您已从系统的 package 存储库安装 php,请尝试查找名称类似于php-soap php7.4-soap

If someone else is managing the server for you, try contacting them and ask them to add the soap extension for you.如果其他人正在为您管理服务器,请尝试联系他们并要求他们为您添加 soap 扩展。

You can also force composer to skip the platform requirements check by adding --ignore-platform-reqs switch to your composer install command.您还可以通过将--ignore-platform-reqs开关添加到您的composer install命令来强制 composer 跳过平台要求检查。 This should force the installation to pass but the library itself might not work properly because of missing extension.这应该会强制安装通过,但由于缺少扩展,库本身可能无法正常工作。 You should only do this when you are sure that the extension is available but composer cannot see it for some reasons (for example when you are running composer with different php configuration).当您确定扩展可用但由于某些原因 composer 看不到它时才应该这样做(例如,当您使用不同的 php 配置运行 composer 时)。

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

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