当前位置: 首页 > 知识库问答 >
问题:

更新编写器时出错

阳宗清
2023-03-14

我在Laravel-5.1中有一个项目,我已经将我的平台从win10改为Ubuntu。

显示错误:

使用包信息加载composer存储库

更新依赖项(包括需要开发人员)

无法将您的需求解析为可安装的软件包集。

  Problem 1
- laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.31 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.30 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.29 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.27 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.26 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.25 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.24 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.23 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.22 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.21 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.20 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.19 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.18 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.17 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.14 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.13 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.12 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.11 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.10 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.2.30 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- Installation request for laravel/framework 5.2.* -> satisfiable by laravel/framework[v5.2.0, v5.2.1, v5.2.10, v5.2.11, v5.2.12, v5.2.13, v5.2.14, v5.2.15, v5.2.16, v5.2.17, v5.2.18, v5.2.19, v5.2.2, v5.2.20, v5.2.21, v5.2.22, v5.2.23, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.29, v5.2.3, v5.2.30, v5.2.31, v5.2.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].

To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

作曲家/json.

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
  "php": ">=5.5.9",
  "laravel/framework": "5.2.*",
  "infyomlabs/laravel-generator": "dev-master",
  "laravelcollective/html": "5.2.*",
  "infyomlabs/core-templates": "dev-master",
  "infyomlabs/swagger-generator": "dev-master",
  "jlapp/swaggervel": "dev-master",
  "doctrine/dbal": "~2.3",
  "infyomlabs/generator-builder": "dev-master",
  "yajra/laravel-datatables-oracle": "~6.0",
  "barryvdh/laravel-ide-helper": "^2.1",
  "infyomlabs/adminlte-templates": "dev-master"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "symfony/css-selector": "2.8.*|3.0.*",
    "symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}

}

共有3个答案

姚臻
2023-03-14
sudo apt-get install php-gd php-xml php7.2-mbstring

像魔咒一样工作

广乐邦
2023-03-14

对于php7,你可以这样做:

sudo apt-get install php-gd php-xml php7.0-mbstring
白晋鹏
2023-03-14

您的错误消息非常明确地说明了发生了什么问题:

laravel/framework v5.2.9需要扩展mbstring*-

您的服务器上是否安装了mbstring,并且是否已启用?

您可以安装mbstring作为libapache2-mod-php5包的一部分:

sudo apt-get安装libapache2-mod-php5

或单独使用:

sudo apt-get安装php-mbstring

安装它也将启用它,但是您也可以通过编辑php.ini文件并删除来启用它 如果已经安装,则注释掉它。

如果这是在您的本地计算机上,则按照适当的步骤在您的环境中安装。

 类似资料:
  • 这大约在3个月前起作用,这是我最后一次编辑这个JSON文件。当时的变化是添加了对的引用,这是我编写的一个库。运行phpupdate给了我以下错误。 问题1 原理/迁移dev-master的安装请求- 条令/迁移开发主机需要symfony/console~2.3- 问题二 条令/迁移1.0。x-dev需要symfony/console~2.3- 条令/条令迁移捆绑包开发主机需要条令/迁移~1.0-

  • 错误: 更新vlucas/phpdotenv(v2.4.0= 目前AWS实例RAM:2GB 虽然我们已经解决了这个问题,从2GB升级内存= 请检查以下几点: 1) Laravel更新软件包(composar.phar update)所需的推荐内存是多少? 2)laravel在作曲家更新时也使用SWAP内存吗?

  • 在我的composer.json我更新了以下行: 当我调用

  • 我奔跑 我得到一个错误: 无法将您的需求解析为可安装的软件包集。 当前在require dev中有以下设置: 以及我们公司创建的一个不相关的翻译包。 我正在尝试将codeception更新到最新版本。 我已经尝试过在不同的版本中设置phpunit,但我无法消除错误。 我做错了什么? 最新消息 我更新composer.json使用相同版本的包 输出,除 跑了 仍然得到错误: 那是为什么呢?在我设置新

  • 最近我安装了Composer,因为它是安装Yii框架的首选方式,但我似乎无法使用它,我不知道为什么。 这是使用composer命令时发生的一个示例:C:\wamp\www

  • 我需要在我的主机上运行composer update,因此我使用ssh登录,并尝试在/www文件夹中运行以下命令,我在该文件夹中安装了Laravel和composer: 我得到这个错误: 我正在与我的主机提供商联系,他们告诉我运行命令: 我运行了这个命令,但得到:“无法打开文件:composer” 怎么办?这里的解决方案是什么?