contao / managed-edition

Contao Managed Edition
17 stars 14 forks source link

Failed to create symbolic link #29

Closed Morgy93 closed 6 years ago

Morgy93 commented 6 years ago

Usually symlinks work fine with my windows composer but for this one it fails and I don't know how to resolve it.

I'm running powershell with administrator privileges:

[Symfony\Component\Filesystem\Exception\IOException]
  Failed to create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php".
Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-install-cmd event terminated with an exception

  [RuntimeException]
  An error occurred while executing the "contao:install" command: 07:35:39 ERROR     [console] Error thrown while running command "--ansi contao:install --env=prod". Message: "Failed to create symbolic link from "C:\x
  ampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php"." ["error" => Symfony\Comp
  onent\Filesystem\Exception\IOException { …},"command" => "--ansi contao:install --env=prod","message" => "Failed to
   create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php"."] []

    [Symfony\Component\Filesystem\Exception\IOException]
    Failed to create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php".

full log:

PS C:\xampp\htdocs\project\dev> composer create-project contao/managed-edition .
Installing contao/managed-edition (4.4.8)
  - Installing contao/managed-edition (4.4.8) Loading from cache
Created project in .
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 106 installs, 0 updates, 0 removals
  - Installing contao-components/installer (1.2.5) Loading from cache
  - Installing contao-components/ace (1.2.8) Loading from cache
  - Installing contao-components/chosen (1.1.10) Loading from cache
  - Installing contao-components/colorbox (1.6.4) Loading from cache
  - Installing contao-components/colorpicker (1.4.0.2) Loading from cache
  - Installing contao-components/compass (0.12.2.1) Loading from cache
  - Installing contao-components/contao (7.1.3) Loading from cache
  - Installing contao-components/datepicker (2.2.0.4) Loading from cache
  - Installing contao-components/dropzone (4.3.0) Loading from cache
  - Installing contao-components/highlight (8.9.1) Loading from cache
  - Installing contao-components/html5shiv (3.7.3) Loading from cache
  - Installing contao-components/jquery (1.12.4) Loading from cache
  - Installing contao-components/jquery-ui (1.12.1.1) Loading from cache
  - Installing contao-components/mediabox (1.5.4.2) Loading from cache
  - Installing contao-components/mediaelement (4.2.6) Loading from cache
  - Installing contao-components/mootools (1.6.0.5) Loading from cache
  - Installing contao-components/respimage (1.4.2) Loading from cache
  - Installing contao-components/simplemodal (2.0.7) Loading from cache
  - Installing contao-components/swipe (2.0.6.2) Loading from cache
  - Installing contao-components/tablesort (3.4.9) Loading from cache
  - Installing contao-components/tablesorter (2.0.5.6) Loading from cache
  - Installing contao-components/tinymce4 (4.6.7.2) Loading from cache
  - Installing twig/twig (v1.35.0) Loading from cache
  - Installing symfony/polyfill-util (v1.6.0) Loading from cache
  - Installing paragonie/random_compat (v2.0.11) Loading from cache
  - Installing symfony/polyfill-php70 (v1.6.0) Loading from cache
  - Installing symfony/polyfill-php56 (v1.6.0) Loading from cache
  - Installing symfony/polyfill-mbstring (v1.6.0) Loading from cache
  - Installing symfony/symfony (v3.3.12) Loading from cache
  - Installing symfony/polyfill-intl-icu (v1.6.0) Loading from cache
  - Installing symfony/polyfill-apcu (v1.6.0) Loading from cache
  - Installing psr/simple-cache (1.0.0) Loading from cache
  - Installing psr/log (1.0.2) Loading from cache
  - Installing psr/link (1.0.0) Loading from cache
  - Installing psr/container (1.0.0) Loading from cache
  - Installing psr/cache (1.0.1) Loading from cache
  - Installing fig/link-util (1.0.0) Loading from cache
  - Installing doctrine/lexer (v1.0.1) Loading from cache
  - Installing doctrine/inflector (v1.1.0) Loading from cache
  - Installing doctrine/collections (v1.4.0) Loading from cache
  - Installing doctrine/cache (v1.6.2) Loading from cache
  - Installing doctrine/annotations (v1.4.0) Loading from cache
  - Installing doctrine/common (v2.7.3) Loading from cache
  - Installing webmozart/assert (1.2.0) Loading from cache
  - Installing webmozart/path-util (2.3.0) Loading from cache
  - Installing true/punycode (v2.1.1) Loading from cache
  - Installing psr/http-message (1.0.1) Loading from cache
  - Installing php-http/message-factory (v1.0.2) Loading from cache
  - Installing clue/stream-filter (v1.4.0) Loading from cache
  - Installing php-http/message (1.6.0) Loading from cache
  - Installing php-http/discovery (1.3.0) Loading from cache
  - Installing php-http/promise (v1.0.0) Loading from cache
  - Installing php-http/httplug (v1.1.0) Loading from cache
  - Installing guzzlehttp/psr7 (1.4.2) Loading from cache
  - Installing guzzlehttp/promises (v1.3.1) Loading from cache
  - Installing guzzlehttp/guzzle (6.3.0) Loading from cache
  - Installing php-http/guzzle6-adapter (v1.1.1) Loading from cache
  - Installing php-http/client-common (v1.6.0) Loading from cache
  - Installing friendsofsymfony/http-cache (2.0.2) Loading from cache
  - Installing friendsofsymfony/http-cache-bundle (2.1.1) Loading from cache
  - Installing terminal42/header-replay-bundle (1.3.0) Loading from cache
  - Installing tecnickcom/tcpdf (6.2.13) Loading from cache
  - Installing swiftmailer/swiftmailer (v5.4.8) Loading from cache
  - Installing symfony/swiftmailer-bundle (v2.6.7) Loading from cache
  - Installing simplepie/simplepie (1.5.1) Loading from cache
  - Installing sensio/framework-extra-bundle (v3.0.28) Loading from cache
  - Installing phpunit/php-token-stream (1.4.11) Loading from cache
  - Installing phpspec/php-diff (v1.1.0) Loading from cache
  - Installing patchwork/utf8 (v1.3.1) Loading from cache
  - Installing oyejorge/less.php (v1.7.0.14) Loading from cache
  - Installing nelmio/cors-bundle (1.5.3) Loading from cache
  - Installing michelf/php-markdown (1.7.0) Loading from cache
  - Installing matthiasmullie/path-converter (1.1.0) Loading from cache
  - Installing matthiasmullie/minify (1.3.55) Loading from cache
  - Installing jeremykendall/php-domain-parser (3.0.0) Loading from cache
  - Installing league/uri (4.2.2) Loading from cache
  - Installing leafo/scssphp (v0.6.7) Loading from cache
  - Installing knplabs/knp-time-bundle (1.7.5) Loading from cache
  - Installing knplabs/knp-menu (2.2.0) Loading from cache
  - Installing knplabs/knp-menu-bundle (2.1.3) Loading from cache
  - Installing imagine/imagine (v0.6.3) Loading from cache
  - Installing doctrine/doctrine-cache-bundle (1.3.2) Loading from cache
  - Installing jdorn/sql-formatter (v1.2.17) Loading from cache
  - Installing doctrine/dbal (v2.5.13) Loading from cache
  - Installing doctrine/doctrine-bundle (1.8.0) Loading from cache
  - Installing contao/imagine-svg (0.1.5) Loading from cache
  - Installing contao/image (0.3.4) Loading from cache
  - Installing contao/core-bundle (4.4.8) Loading from cache
  - Installing contao/calendar-bundle (4.4.8) Loading from cache
  - Installing contao/comments-bundle (4.4.8) Loading from cache
  - Installing contao/faq-bundle (4.4.8) Loading from cache
  - Installing contao/listing-bundle (4.4.8) Loading from cache
  - Installing monolog/monolog (1.23.0) Loading from cache
  - Installing symfony/monolog-bundle (v2.12.1) Loading from cache
  - Installing ua-parser/uap-php (v3.4.7) Loading from cache
  - Installing nelmio/security-bundle (2.4.0) Loading from cache
  - Installing lexik/maintenance-bundle (v2.1.1) Loading from cache
  - Installing contao/manager-plugin (2.1.0) Loading from cache
  - Installing sensiolabs/ansi-to-html (v1.1.3) Loading from cache
  - Installing composer/ca-bundle (1.0.9) Loading from cache
  - Installing sensiolabs/security-checker (v4.1.6) Loading from cache
  - Installing sensio/distribution-bundle (v5.0.21) Loading from cache
  - Installing contao/installation-bundle (4.4.8) Loading from cache
  - Installing contao/manager-bundle (4.4.8) Loading from cache
  - Installing contao/news-bundle (4.4.8) Loading from cache
  - Installing contao/newsletter-bundle (4.4.8) Loading from cache
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
php-http/message suggests installing slim/slim (Used with Slim Framework PSR-7 implementation)
php-http/message suggests installing zendframework/zend-diactoros (Used with Diactoros Factories)
php-http/discovery suggests installing puli/composer-plugin (Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details.)
php-http/client-common suggests installing php-http/cache-plugin (PSR-6 Cache plugin)
php-http/client-common suggests installing php-http/logger-plugin (PSR-3 Logger plugin)
php-http/client-common suggests installing php-http/stopwatch-plugin (Symfony Stopwatch plugin)
simplepie/simplepie suggests installing mf2/mf2 (Microformat module that allows for parsing HTML for microformats)
sensio/framework-extra-bundle suggests installing symfony/psr-http-message-bridge (To use the PSR-7 converters)
patchwork/utf8 suggests installing ext-wfio (Use WFIO for UTF-8 filesystem access on Windows)
knplabs/knp-menu suggests installing pimple/pimple (for the built-in implementations of the menu provider and renderer provider)
knplabs/knp-menu suggests installing silex/silex (for the integration with your silex application)
imagine/imagine suggests installing ext-gmagick (to use the Gmagick implementation)
imagine/imagine suggests installing ext-imagick (to use the Imagick implementation)
doctrine/doctrine-cache-bundle suggests installing symfony/security-acl (For using this bundle to cache ACLs)
doctrine/doctrine-bundle suggests installing doctrine/orm (The Doctrine ORM integration is optional in the bundle.)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
Generating autoload files
> Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication

 Added/updated the web/.htaccess file.
 Added/updated the web/app.php file.
 Added/updated the web/app_dev.php file.

 // Clearing the cache for the prod environment with debug false

 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.

 // Warming up the cache for the prod environment with debug false

 [OK] Cache for the "prod" environment (debug=false) was successfully warmed.

 Trying to install assets as relative symbolic links.

 --------- ------------------------ ----------------
            Bundle                   Method / Error
 --------- ------------------------ ----------------
  WARNING   ContaoCoreBundle         copy
  WARNING   ContaoCalendarBundle     copy
  WARNING   ContaoCommentsBundle     copy
  WARNING   ContaoFaqBundle          copy
  WARNING   ContaoNewsBundle         copy
  WARNING   ContaoNewsletterBundle   copy
 --------- ------------------------ ----------------

 ! [NOTE] Some assets were installed via copy. If you make changes to these assets you have to run this command again.

 [OK] All assets were successfully installed.

 * system
 * system/config
 * templates
 * web/system
 * files
 * assets/css
 * assets/js
 * system/cache
 * system/modules
 * system/themes
 * system/tmp
 * web/share
 * C:\xampp\htdocs\project\dev\assets\images

 Added/updated the system/initialize.php file.

07:35:39 ERROR     [console] Error thrown while running command "--ansi contao:install --env=prod". Message: "Failed to create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php"." ["error" => Symfony\Component\Filesystem\Exception\IOException { …},"command" => "--ansi contao:install --env=prod","message" => "Failed to create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php"."] []

  [Symfony\Component\Filesystem\Exception\IOException]
  Failed to create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php".

contao:install [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<target>]

Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-install-cmd event terminated with an exception

  [RuntimeException]
  An error occurred while executing the "contao:install" command: 07:35:39 ERROR     [console] Error thrown while running command "--ansi contao:install --env=prod". Message: "Failed to create symbolic link from "C:\x
  ampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php"." ["error" => Symfony\Comp
  onent\Filesystem\Exception\IOException { …},"command" => "--ansi contao:install --env=prod","message" => "Failed to
   create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php"."] []

    [Symfony\Component\Filesystem\Exception\IOException]
    Failed to create symbolic link from "C:\xampp\htdocs\project\dev\vendor\contao\core-bundle\src\Resources\contao\config\tcpdf.php" to "C:\xampp\htdocs\project\dev\system\config\tcpdf.php".

  contao:install [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<target>]

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
Morgy93 commented 6 years ago

I tried it with Bash on Ubuntu on Windows and it installed without any issues - I'll have a look if I get it running with xampp then, but still would love to have it resolved with powershell/cmd

fritzmg commented 6 years ago

@Morgy93 you should post such problems on the community forum, not here. You need to configure your Windows environment for the PHP and Apache process to allow to create symbolic links.

Morgy93 commented 6 years ago

@fritzmg I'm dealing with symlinks (by composer) on windows every day, but it fails in this specific case. (Probably because it's symphony?!)

But anyway, I'll report it to the community forum then - thanks!