dqrfdl5708
2016-08-15 15:19
浏览 99
已采纳

使用composer进行Eloquent安装失败

Installing illuminate/database via composer fails and generate the following error:

"Your requirements could not be resolved to an installable set of packages."
Problem 1 - illuminate/database v5.2.0 requires illuminate/support 5.2.* -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.6, v5.2.7].

  • illuminate/support v5.2.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

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-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-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.

"Installation failed, reverting ./composer.json to its original content."

I am want to use Eloquent to connect Slim PHP application to a database. I have used the following command to add Eloquent to the application locally:

php composer.phar require illuminate/database "~5.1"

I also tried:

php composer.phar require illuminate/database.

How to install Illuminate\Database\Eloquent | Laravel via composer ?.

图片转代码服务由CSDN问答提供 功能建议

通过composer安装illuminate / database失败并生成以下错误:

“您的要求无法解析为可安装的软件包。”
问题1 - 照亮/数据库v5.2.0需要照亮/支持5.2。* - > 可以通过illuminate / support [v5.2.0,v5.2.19,v5.2.21,v5.2.24, v5.2.25,v5.2.26,v5.2.27,v5.2.28,v5.2.31,v5.2.32,v5。 2.37, v5.2.43,v5.2.6,v5.2.7]。

  • 照亮/支持v5.2.7需要ext-mbstring * - > 您的系统中缺少所请求的PHP扩展名mbstring。

    要启用扩展,请验证它们是否

    < p>在那些.ini文件中启用: - /etc/php/7.0/cli/php.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-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-sysv msg.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您也可以在终端内运行 php --ini ,以查看PHP在CLI模式下使用的文件。 \ n

    “安装失败,将./composer.json恢复为原始内容。” < 我想使用Eloquent将Slim PHP应用程序连接到数据库。 我使用以下命令在本地向应用程序添加Eloquent:

    php composer.phar require illuminate / database“~5.1”

    我也尝试过:

    php composer.phar require illuminate / database。 \ n

    如何安装Illuminate \ Database \ Eloquent | Laravel通过作曲家?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dpca4790 2016-08-15 15:57
    已采纳

    The error message tells you what is wrong, and hints at what you should do:

    the requested PHP extension mbstring is missing from your system

    To enable extensions, verify that they are enabled in those .ini files

    You need to install (or maybe just enable) PHP's mbstring extension. The exact procedure will depend on your operating system and also how you installed PHP in the first place.

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题