【发布时间】:2014-06-25 09:40:00
【问题描述】:
我想在 Ubuntu 上安装 zend 框架,我已按照安装说明进行操作 http://framework.zend.com/manual/2.2/en/user-guide/skeleton-application.html 链接但安装失败。
我已经从这里下载了 ZendSkeletonApplication https://github.com/zendframework/ZendSkeletonApplication
运行此命令后
php composer.phar self-update // it's working
但是在第一个命令之后是第二个命令
php composer.phar install // Not working
并显示此错误
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- zendframework/zendframework 2.3.1 requires php >=5.3.23 -> no matching package found.
- zendframework/zendframework 2.3.0 requires php >=5.3.23 -> no matching package found.
- Installation request for zendframework/zendframework 2.3.* -> satisfiable by zendframework/zendframework[2.3.0, 2.3.1].
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> for more details.
更新在一些 cmets 之后:
现在我已经下载了 ZendSkeletonApplication-master 并移动了
ZendFramework-2.3.1 的库文件夹
在
ZendSkeletonApplication-master/vendor/ZF2/
但之后当我访问此页面时,我在页面上收到此错误
ZendSkeletonApplication-master/public/index.php // 在浏览器中显示这个错误
Fatal error: Declaration of Zend\Stdlib\ArrayObject::offsetGet() must be compatible with
that of ArrayAccess::offsetGet() in /var/www/html/demo/username/ZendSkeletonApplication
-master/vendor/ZF2/library/Zend/Stdlib/ArrayObject.php on line 22
【问题讨论】:
-
问题很明确:ZF2 需要 PHP 5.3.23 或更高版本,它应该安装在您的系统上。 php -v 命令的输出是什么?
-
php-v 的输出是:- PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch (cli) (built: Apr 4 2014 01:27:23) Copyright (c) 1997- 2012 PHP Group Zend Engine v2.3.0,版权所有 (c) 1998-2012 Zend Technologies
-
@user3611956 那么,你学到了什么?
-
我在我的电脑上安装了 php5 和 mysql 和 apache 但还没有解决。
-
你运行的是哪个版本的 Ubuntu?
标签: php zend-framework2 composer-php