dsa88886666 2014-05-08 06:26
浏览 41
已采纳

如何在Ubuntu上安装zend框架?

I want to install zend framework on the Ubuntu and i have followed the instruction of installation from http://framework.zend.com/manual/2.2/en/user-guide/skeleton-application.html link but failed to install.

I have downloaded the ZendSkeletonApplication from here https://github.com/zendframework/ZendSkeletonApplication

After that run of this command

php composer.phar self-update   // it's working

But after the first command the second Command

php composer.phar install   // Not working

And showing this error

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.

Update after some comments:

Now I've downloaded the ZendSkeletonApplication-master and move the

Library folder of ZendFramework-2.3.1

in the

ZendSkeletonApplication-master/vendor/ZF2/

But after that when i access this i'm getting this error on the page

ZendSkeletonApplication-master/public/index.php // in the browser it showing me this error

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
  • 写回答

3条回答 默认 最新

  • doublel83422 2014-05-08 07:27
    关注

    Well two solutions are possible :

    First upgrade php, However it could be possible that Ubuntu release on your system not having upgrades for php. So in that case search google to add APT repository for php 5.3.23 for your ubuntu-VERSION.

    Second I personally experienced that, Checkout in folder you will found composer.json file, In that file you will get the settings something like

    "require": {
        "php": ">=5.3.23",
        "zendframework/zendframework": "2.3.*"
    }
    

    Just change settings to get other version of ZF2

    "require": {
        "php": ">=5.3.3",
        "zendframework/zendframework": "2.2.*"
    }
    

    It works for me. It should work for you.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式