【问题标题】:Cake PHP installation issue [duplicate]Cake PHP安装问题[重复]
【发布时间】:2017-07-03 09:00:16
【问题描述】:

我已经使用 composer 安装了 cakephp。 但是在运行时显示以下错误。

警告:需要(D:\xampp\htdocs\my_app_name/vendor/autoload.php):无法打开流:D:\xampp\htdocs\my_app_name\webroot\index 中没有这样的文件或目录。第 27 行的 php 致命错误:require():无法在 D:\xampp\htdocs\my_app_name\ 中打开所需的 'D:\xampp\htdocs\my_app_name/vendor/autoload.php' (include_path='D:\xampp\php\PEAR')第 27 行的 webroot\index.php

你能帮帮我吗?

 
Lenovo-User@Lenovo MINGW64 /d/xampp/htdocs
$ composer self-update
You are already using composer version 1.4.2 (stable channel).
 
Lenovo-User@Lenovo MINGW64 /d/xampp/htdocs
$ composer create-project --prefer-dist cakephp/app mylogin
Installing cakephp/app (3.4.2)
  - Installing cakephp/app (3.4.2): Loading from cache
Created project in mylogin
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
    - cakephp/cakephp 3.4.9 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
    - cakephp/cakephp 3.4.8 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
    - cakephp/cakephp 3.4.7 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
    - cakephp/cakephp 3.4.6 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
    - cakephp/cakephp 3.4.5 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
    - cakephp/cakephp 3.4.4 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
    - cakephp/cakephp 3.4.3 requires ext-intl * -> the requested PHP extension i
ntl is missing from your system.
    - cakephp/cakephp 3.4.2 requires lib-icu >=4.8 -> the requested linked libra
ry icu has the wrong version installed or is missing from your system, make sure
 to have the extension providing it.
    - cakephp/cakephp 3.4.1 requires lib-icu >=4.8 -> the requested linked libra
ry icu has the wrong version installed or is missing from your system, make sure
 to have the extension providing it.
    - cakephp/cakephp 3.4.0 requires lib-icu >=4.8 -> the requested linked libra
ry icu has the wrong version installed or is missing from your system, make sure
 to have the extension providing it.
    - Installation request for cakephp/cakephp 3.4.* -> satisfiable by cakephp/c
akephp[3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 3.4.9].
 
  To enable extensions, verify that they are enabled in your .ini files:
    - D:\xampp\php\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PH
P in CLI mode.
 
Lenovo-User@Lenovo MINGW64 /d/xampp/htdocs
$
 

谢谢,

【问题讨论】:

  • 你能告诉我们Cakephp的版本吗?
  • @ÁlvaroGonzález CakePHP 3.4
  • @Sehdev 我认为是最新版本 cakephp 3.4
  • @drmonkeyninja 你是对的......现在已修复..Php.ini 文件已编辑..非常感谢
  • @ÁlvaroGonzález 也许在 CakePHP 2.x 中,它按照惯例使用这些大写的目录名称,并附带将供应商目录配置为 Vendora composer config

标签: cakephp cakephp-3.4


【解决方案1】:

首先运行以下命令(如果全局安装了 composer,你可能需要在前面加上 sudo)

composer self-update 

再来一次

composer create-project --prefer-dist cakephp/app my_app_name

【讨论】:

  • 嗨,我试过下面的代码。但显示以下错误警告:require(D:\xampp\htdocs\mylogin/vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\mylogin\webroot\index.php在第 27 行致命错误:require(): Failed opening required 'D:\xampp\htdocs\mylogin/vendor/autoload.php' (include_path='D:\xampp\php\PEAR') in D:\xampp\htdocs \mylogin\webroot\index.php 第 27 行
猜你喜欢
  • 2010-10-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-12-11
  • 2012-10-14
  • 2014-03-14
相关资源
最近更新 更多