Issue of installing
Detailed description of the problem [REQUIRED]
use "composer install --no-dev “ Windows 10
cmd "composer install --no-dev "
`N:\phpEnv\www\Lychee3>composer install --no-dev
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: bepsvpt/secure-headers
Discovered Package: darkghosthunter/larapass
Discovered Package: fideloper/proxy
Discovered Package: livewire/livewire
Discovered Package: lychee-org/nestedset
Discovered Package: nesbot/carbon
Discovered Package: spatie/laravel-feed
Discovered Package: spatie/laravel-image-optimizer
Package manifest generated successfully.
> @php scripts/install_files.php
creating file for CSS personalization
creating default SQLite database
setting up hooks for git pull and git commits
Warning: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php on line 114
Fatal error: Uncaught Safe\Exceptions\FilesystemException: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php:9
Stack trace:
#0 N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php(117): Safe\Exceptions\FilesystemException::createFromPhpError()
#1 N:\phpEnv\www\Lychee3\scripts\install_files.php(20): Safe\copy('scripts/pre-com...', '.git/hooks/pre-...')
#2 {main}
thrown in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php on line 9
PHP Warning: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php on line 114
PHP Fatal error: Uncaught Safe\Exceptions\FilesystemException: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php:9
Stack trace:
#0 N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php(117): Safe\Exceptions\FilesystemException::createFromPhpError()
#1 N:\phpEnv\www\Lychee3\scripts\install_files.php(20): Safe\copy('scripts/pre-com...', '.git/hooks/pre-...')
#2 {main}
thrown in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php on line 9
Script @php scripts/install_files.php handling the install_files event returned with error code 255
Script @install_files was called via post-autoload-dump`
And run "php artisan migrate" Appear:
N:\phpEnv\www\Lychee3>php artisan key:generate
Application key set successfully.
N:\phpEnv\www\Lychee3>php artisan migrate
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? (yes/no) [no]:
> y
In Connection.php line 712:
SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown storage engine 'InnoDB' (SQL: create table `migrations` (`id` int unsigned not null auto_increment prima
ry key, `migration` varchar(255) not null, `batch` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci' engine = InnoDB ROW_FORMAT=DYNAMIC)
In Connection.php line 495:
SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown storage engine 'InnoDB'
Steps to reproduce the issue
Steps to reproduce the behavior:
- Win10
- run "composer install --no-dev "
Screenshots If applicable, add screenshots to help explain your problem.
Output of the diagnostics [REQUIRED]
(Settings => Diagnostics or https://example.com/Diagnostics or php artisan lychee:diagnostics)
N:\phpEnv\www\Lychee3>php artisan lychee:diagnostics
In Configs.php line 165:
update_check_every_days does not exist in config!
Browser and system
I have never used Lychee on Windows so this will be difficult to help. can you check that:
- you have a
.envfile - that you have php-mysql installed (it mentions innoDB)
Did you clone the repo using git clone or do you downloaded the ZIP file from github? Latter won't work, because we need the .git directory currently (that's where composer install is failing). We should add a check if .git/hooks exists and if not, do not copy the hooks.
@ildyria @qwerty287 ,Sorry,I forgot my mysql version is 5.3. But, whether it's downloading the ZIP file from github or from releases page,
running “install_files.php” this problem always occurs:
@php scripts/install_files.php
creating file for CSS personalization
creating default SQLite database
setting up hooks for git pull and git commits
Warning: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php on line 114
Fatal error: Uncaught Safe\Exceptions\FilesystemException: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php:9
Stack trace:
#0 N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php(117): Safe\Exceptions\FilesystemException::createFromPhpError()
#1 N:\phpEnv\www\Lychee3\scripts\install_files.php(20): Safe\copy('scripts/pre-com...', '.git/hooks/pre-...')
#2 {main}
thrown in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php on line 9
PHP Warning: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php on line 114
PHP Fatal error: Uncaught Safe\Exceptions\FilesystemException: copy(.git/hooks/pre-commit): Failed to open stream: No such file or directory in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php:9
Stack trace:
#0 N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\filesystem.php(117): Safe\Exceptions\FilesystemException::createFromPhpError()
#1 N:\phpEnv\www\Lychee3\scripts\install_files.php(20): Safe\copy('scripts/pre-com...', '.git/hooks/pre-...')
#2 {main}
thrown in N:\phpEnv\www\Lychee3\vendor\thecodingmachine\safe\generated\Exceptions\FilesystemException.php on line 9
Script @php scripts/install_files.php handling the install_files event returned with error code 255
Script @install_files was called via post-autoload-dump
There are 3 different download methods:
- clone using git
- Download a ZIP from the releases page (
Lychee.zip, NOTSource code.zip) - Download a ZIP from GitHub's code view (option for this is above the files)
3 will not work. If you use 2, don't run composer install, the dependencies etc. are already installed and available. Just set up your DB and serve the directory.
If you use 1, you must run composer install, but the errors you have shouldn't appear then.
Which method did you use?
Also note that MySQL 5.7.8 is the minimum supported version for Lychee 4.5.3.
Also note that MySQL 5.7.8 is the minimum supported version for Lychee 4.5.3.
why 3 will not work. I used to be using 3 .
now I got this:
Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer updateorcomposer update
Problem 1 - Root composer.json requires PHP extension ext-posix * but it is missing from your system. Install or enable PHP's posix extension.
To enable extensions, verify that they are enabled in your .ini files:
- N:\phpEnv\php\php-8.1\php.ini
You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-posix to temporarily ignore these required extensions.`
Also note that MySQL 5.7.8 is the minimum supported version for Lychee 4.5.3.
Thanks
I think this can be closed? @sunosv Were you able to install Lychee? (The error messages you gave above actually say exactly what you have to do)