claroline / Claroline

Learning management system
https://www.claroline.com
Other
315 stars 188 forks source link

Install Error on alt-master branch #280

Closed ericvincenterv closed 11 years ago

ericvincenterv commented 11 years ago

There is a strange install issue with the alt-master branch when doing a 'composer install' :

  - Installing claroline/core-bundle (1.3.0)
    Downloading: 100%         

  - Installing claroline/core-bundle as a Claroline core bundle
  - Removing claroline/core-bundle (1.3.0)
An exception has been thrown during claroline/core-bundle installation. The package has been removed. Installation is aborting.

This blocks the installation.

solispauwels commented 11 years ago

If just after this error you have this one:

[InvalidArgumentException]                                               
  The file "/var/www/Claroline/app/config/parameters.yml" does not exist. 

Is that you dont have the parameters.yml file.

stefk commented 11 years ago

Hi,

The installation steps for this branch aren't currently documented (it will be one of the subjects of the hangout meeting tomorrow) and might change in a near future. Anyway, if you want to give it a try now, here they are :

  1. Make a checkout of the alt-master branch (you'd better do it in a separate project as many files/directories of the previous structure are not valid anymore)
  2. Create an app/config/parameters.yml file and fill at least the main db parameters (database doesn't have to exist, but if it exists, it must be empty)
  3. Set the permissions for app/cache, app/config, app/logs, files, web/themes, web/thumbnails, web/uploads
  4. Install with :
    • composer require claroline/bundle-recorder ~1.0
    • cp composer.dist.json composer.json
    • composer update --prefer-source
  5. Then dump the assets and create a first admin user :
    • php app/console assetic:dump
    • php app/console claroline:user:create -a admin admin admin admin
ericvincenterv commented 11 years ago

@solispauwels : /var/www/Claroline/app/config/parameters.yml file exists and is OK.

ericvincenterv commented 11 years ago

I have this :

1, 2 and 3 = ok.

4 :

 composer update --prefer-source
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
    - Installation request for claroline/claronext 2.3.x-dev -> satisfiable by claroline/claronext[2.3.x-dev].
    - claroline/claronext 2.3.x-dev requires claroline/taxonomy-bundle dev-master -> satisfiable by claroline/taxonomy-bundle[dev-master].
    - claroline/taxonomy-bundle dev-master requires claroline/kernel-bundle dev-master -> satisfiable by claroline/kernel-bundle[dev-master].
    - claroline/taxonomy-bundle dev-master requires claroline/kernel-bundle dev-master -> satisfiable by claroline/kernel-bundle[dev-master].
    - claroline/taxonomy-bundle dev-master requires claroline/kernel-bundle dev-master -> satisfiable by claroline/kernel-bundle[dev-master].
    - Conclusion: don't install claroline/kernel-bundle dev-master
stefk commented 11 years ago

In the alt-master branch, the root package name is claroline/claroline and not claroline/claronext and there's no reference to claroline/taxonomy-bundle (as it's not ready for integration yet). Apparently you're not on the right branch or you're using an outdated composer.json (maybe you forgot cp composer.dist.json composer.json).

ericvincenterv commented 11 years ago

my bad, the error is :

  - Installing claroline/core-bundle (1.3.0)
    Downloading: 100%         

  - Installing claroline/core-bundle as a Claroline core bundle
  - Removing claroline/core-bundle (1.3.0)
An exception has been thrown during claroline/core-bundle installation. The package has been removed. Installation is aborting.

  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]                         
  The service "claroline.installation.manager" has a dependency on a non-existent service "kernel".  

We can discuss this in tomorrows hangout.

stefk commented 11 years ago

@ericvincenterv, I'll have a look at it tomorrow.

stefk commented 11 years ago

@ericvincenterv, could you paste here the exact version of composer you use (as shown by composer --version) and the content of the app/config/bundles.ini file ?

ericvincenterv commented 11 years ago
Claroline git:(alt-master) ✗ composer --version
Composer version 9b70b89b8f8d60b56b5900ea232109427604c748

app/config/bundles.ini

Claroline\InstallationBundle\ClarolineInstallationBundle = true
ICAPLyon1\Bundle\SimpleTagBundle\ICAPLyon1SimpleTagBundle = true
Claroline\KernelBundle\ClarolineKernelBundle = true
ericvincenterv commented 11 years ago

As per instructions issued in this mornings hangout we have self-update and reinstalled a clean copy of Claroline using the alt-master branch here is the new error :

 ...

  - Installing claroline/core-bundle (1.3.1)
    Cloning f36e7058567a43d5c503034a10a5ceb8682b2cdf

  - Installing claroline/core-bundle as a Claroline core bundle
  - Removing claroline/core-bundle (1.3.1)
An exception has been thrown during claroline/core-bundle installation. The package has been removed. Installation is aborting.

  [Doctrine\DBAL\DBALException]                                                                                                                     
  An exception occurred while executing 'SELECT t0.id AS id1, t0.name AS name2, t0.path AS path3, t0.plugin_id AS plugin_id4 FROM claro_theme t0':  

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'claroline_prod.claro_theme' doesn't exist

  [PDOException]                                                                                        
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'claroline_prod.claro_theme' doesn't exist 

Looks like the corebundle should be creating the tables but is choking somewhere.

@arnaudbey can confim this bug in a seperate installation.

arnaudbey commented 11 years ago

just a detail, in order the previous command to work, you need doublequote the version number :

composer require claroline/bundle-recorder "~1.0"

but i'm stuck with the same bug

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'claroline_prod.claro_theme' doesn't exist 
maxailloud commented 11 years ago

I have the same issue here. Composer to the lastest version (as it says):

Composer version 5b96caf8ce5d667ca6a80a446a8192ebd4aa2b6b 2013-09-16 12:08:43

Here is the exception trace:

Exception trace:
 () at /home/maxime/workspace/Claroline/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:698
 PDO->query() at /home/maxime/workspace/Claroline/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:698
 Doctrine\DBAL\Connection->executeQuery() at /home/maxime/workspace/Claroline/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:930
 Doctrine\ORM\Persisters\BasicEntityPersister->loadAll() at /home/maxime/workspace/Claroline/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:181
 Doctrine\ORM\EntityRepository->findBy() at /home/maxime/workspace/Claroline/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:164
 Doctrine\ORM\EntityRepository->findAll() at /home/maxime/workspace/Claroline/vendor/claroline/core-bundle/Claroline/CoreBundle/Library/Themes/ThemeService.php:30
 Claroline\CoreBundle\Library\Themes\ThemeService->__construct() at /home/maxime/workspace/Claroline/app/cache/tmp1379422316/appTmp1379422316ProjectContainer.php:499
 appTmp1379422316ProjectContainer->getClaroline_Common_ThemeServiceService() at /home/maxime/workspace/Claroline/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:313
 Symfony\Component\DependencyInjection\Container->get() at /home/maxime/workspace/Claroline/app/cache/tmp1379422316/appTmp1379422316ProjectContainer.php:1758
 appTmp1379422316ProjectContainer->getTemplating_LocatorService() at /home/maxime/workspace/Claroline/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:313
 Symfony\Component\DependencyInjection\Container->get() at /home/maxime/workspace/Claroline/app/cache/tmp1379422316/appTmp1379422316ProjectContainer.php:479
 appTmp1379422316ProjectContainer->getCacheWarmerService() at /home/maxime/workspace/Claroline/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:313
 Symfony\Component\DependencyInjection\Container->get() at /home/maxime/workspace/Claroline/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:572
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /home/maxime/workspace/Claroline/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:131
 Symfony\Component\HttpKernel\Kernel->boot() at /home/maxime/workspace/Claroline/vendor/claroline/core-installer/Claroline/CoreInstaller/Installer.php:179
 Claroline\CoreInstaller\Installer->getBaseInstaller() at /home/maxime/workspace/Claroline/vendor/claroline/core-installer/Claroline/CoreInstaller/Installer.php:62
 Claroline\CoreInstaller\Installer->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:153
 Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:140
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:510
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:211
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:116
 Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:897
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:191
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:117
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:121
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:83
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
 require() at /usr/local/bin/composer:15

It seems that it's the template locator that failed because it checks database before table are create.

stefk commented 11 years ago

Ok, I think the problem is solved by claroline/CoreBundle@4b92df8aeb01375003467e6f2c5116d834fb25df. Can you try again ?

stefk commented 11 years ago

@arnaudbey, have you made changes to composer.json ? There shouldn't be any installation request for dev-master versions of claroline/core-bundle and friendsofsymfony/jsrouting-bundle, as there aren't any references to those versions in the whole project. Core bundle is fixed to ~1.0 in the root package and fos/jsrouting to ~1.2.1 in the core bundle dependencies.

maxailloud commented 11 years ago

It's working for me.

arnaudbey commented 11 years ago

:+1: sorry, working, dunno what i've done :)

stefk commented 11 years ago

Great, thanks for your feedback.

ericvincenterv commented 11 years ago

It's ok for me too ;-) Thanks.