简体   繁体   中英

Sylius installation aborts

I want to try out sylius but I have the following problems with installation :

php composer.phar create-project sylius/sylius -s dev /wamp/www/sylius2

Error message :

Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.jso
n. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for doctrine/mongodb 1.0.3 -> satisfiable by doctrine/mongodb[1.0.3].
- doctrine/mongodb 1.0.3 requires ext-mongo >=1.2.12,<1.5-dev -> the requested PHP extension mongo is missing from your system.
Problem 2
- doctrine/mongodb 1.0.3 requires ext-mongo >=1.2.12,<1.5-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb-odm dev-master requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.3].
- Installation request for doctrine/mongodb-odm dev-master -> satisfiable by doctrine/mongodb-odm[dev-master].

After reparing in deifferent ways the request problems, I try to execute :

php app/console sylius:install

Error message :

PHP Warning:  require_once(C:\wamp\www\sylius2\app/bootstrap.php.cache): failed to open stream: No such file or directory in C:\wamp\www\sylius2\app\console on line 15

Warning: require_once(C:\wamp\www\sylius2\app/bootstrap.php.cache): failed to open stream: No such file or directory in C:\wamp\www\sylius2\app\console on line 15

PHP Fatal error:  require_once(): Failed opening required 'C:\wamp\www\sylius2\app/bootstrap.php.cache' (include_path='.;C:\wamp\bin\php\php5.4.6\pear') in C:\wamp\www\sylius2\app\console on line 15

Fatal error: require_once(): Failed opening required 'C:\wamp\www\sylius2\app/bootstrap.php.cache' (include_path='.;C:\wamp\bin\php\php5.4.6\pear') in C:\wamp\www\sylius2\app\console on line 15

This seems to be normal because the steps of composer command were interrupted.

So in the first place why do I get those request problemes on mongodb - Is there any way to get this fixed ?

It has been fixed in master. MongoDB is no longer required to run Sylius, unless you want to use it with this storage.

In composer.json remove "doctrine/mongodb-odm": "1.0.*@dev" from the require-dev section and remove the , (comma) from the previous item. This should remove all dependencies on MongoDB which you don't have installed.

First of all, you requested Sylius " dev " version ( -s dev ) and you don't have "php mongo extension" installed on your system. If you're running Debian distribution it would be as simple as sudo apt-get install php5-mongo . Please keep in mind that you need to register mongo extension in your php.ini file and for this particular task you have to edit eg /etc/php5/cli/php.ini file (note CLI ). I also suggest you to register your mongo extension in web server configuration also eg /etc/php5/apache2/php.ini . Simple add one line $ echo "extension=mongo.so" >> php.ini to your php.ini file. That'd be all!

If you don't need Sylius " dev " stability simply remove "-s dev" argument when doing composer create project command:

php composer.phar create-project sylius/sylius /wamp/www/sylius2

Hope that helps!

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