doupeng3501
2016-08-08 13:56
浏览 304
已采纳

Composer安装失败“无法将要求解析为可安装的软件包集。”

I am trying to install the braunson/fatsecret package with PHP Composer on my local XAMPP installation. https://packagist.org/packages/braunson/fatsecret-laravel

When I try to install it with the following command:

php composer.phar require "braunson/fatsecret:dev-master"

The installation fails, and I get the following message:

Your requirements could not be resolved to an installable set of packages.

Installation failed message

I have installed composer (in my opinion) correctly in /Applications/XAMPP/htdocs/my-folder/ like the documentation says:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

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

我正在尝试使用PHP Composer在我的本地XAMPP安装上安装braunson / fatsecret软件包。 https://packagist.org/packages/braunson/fatsecret-laravel

当我尝试使用以下命令安装它时:

  php composer.phar require“braunson / fatsecret:dev-master”
    
 
 

安装失败,我收到以下消息:

您的要求无法解析为可安装的一组\ n个包。

我安装了作曲家(在我看来) )正确地在 / Applications / XAMPP / htdocs / my-folder / 中文档说:

  php -r“copy('https:/  /  getcomposer.org/installer','composer-setup.php');“
 
npp -r”if(hash_file('SHA384','composer-setup.php')==='e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae'){echo'安装程序已验证 “;  } else {echo'Installer corrupt'; 取消关联( '作曲家-setup.php');  } echo PHP_EOL;“
 
nphp composer-setup.php 
php -r”unlink('composer-setup.php');“
   
 
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongtu4559 2016-08-08 14:16
    已采纳

    The package is called braunson/fatsecret-laravel, as per the link you provided to Packagist. Looks like the project's readme is out of date, possibly the package changed names at some point in the past.

    You should be able to just change your command to

    php composer.phar require "braunson/fatsecret-laravel:dev-master"
    
    打赏 评论

相关推荐 更多相似问题