简体   繁体   中英

error using composer to install cakePHP 3

i am lost...

i am trying to do it the right way and am following the Quick Start Guide for installing cakePHP 3 on my ubuntu machine.

Got composer installed. Directory is /var/www/cakephp

and am trying to issue:

php composer.phar create-project --prefer-dist cakephp/app mayapp

or

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

then i am simply getting:

[InvalidArgumentException]                              
  Could not find package cakephp/app with stability stable.

i do not have a clue what i am doing wrong. Any suggestions?

cakephp/app exists on https://packagist.org , and the command looks ok to me.

Which PHP version are you using? That package is only available with PHP 5.4.16 or later, so you must update if you want to use CakePHP.

However, it is a good idea to only use the same PHP version of your public hosting, using a newer version will lead to problems when deploying your code. If your webspace or public server does not have the latest PHP 5.6 running, ask for an update.

I got same issue. But, as previous answer, myapp does not exists on packagist.org, so, you must use laravel/laravel instead, and, after created, rename the new laravel folder to your desired name and move to htdocs (for xampp) or www (for wamp), then, and I do not know why, go to : localhost/laravel/public/ and replace laravel with the name you gave to your project folder instead the laravel one. You will see Laravel 5 fonts will appear on screen.

That's means Laravel is running.

Hey Please try these steps.

  1. Download XAMPP Server.
  2. Install XAMPP server.
  3. Go to ..\\xampp\\php\\php.ini and open.
  4. Add this line (extension=php_intl.dll) or if exist uncomment.
  5. Download Composer setup from https://github.com/composer/windows-setup/releases/
  6. Install composer and give php.exe file in path
  7. Open cmd and check now php version using command php -v. if its showing php version its means its working.
  8. Now open cmd and cd on xampp\\htdocs folder & run command composer create-project --prefer-dist cakephp/app app_name
  9. Finished folder created in htdocs.

Hope this is helpful for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM