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 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记