我试图为facebook加载最新的php sdk,但我收到了作曲家的错误。关于我可能做错的任何想法?
{
"minimum-stability": "dev",
"require" : {
"facebook/php-sdk-v4" : "4.0.*"
}
}
[root@gridjungle gridjungle]# composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - facebook/php-sdk-v4 4.0.8 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.7 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.6 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.5 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.4 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.3 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.2 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.1 requires php >=5.4.0 -> no matching package found. - facebook/php-sdk-v4 4.0.0 requires php >=5.4.0 -> no matching package found. - Installation request for facebook/php-sdk-v4 4.0.* -> satisfiable by facebook/php-sdk-v4[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4,
4.0.5,4.0.6,4.0.7,4.0.8]。
Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion>
了解更多详情。
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. [root@gridjungle gridjungle]# composer install Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update
更新它们。 无需安装或更新 生成自动加载文件
答案 0 :(得分:3)
PHP SDK的第4版需要PHP 5.4 +。
如果您无法升级PHP版本,则必须使用较旧的SDK,&#34; facebook / php-sdk&#34;
克林特C编辑:Fosco是对的。由于安装了多个版本的PHP,我必须指定要使用的作曲家版本。为此,我必须在我的项目位置本地安装composer,而不是使用全局安装的版本。
/usr/local/php-5.5.13-cgi/bin/php composer.phar update