Lychee icon indicating copy to clipboard operation
Lychee copied to clipboard

Issue of installing

Open sunosv opened this issue 3 years ago • 7 comments

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:

  1. Win10
  2. 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

sunosv avatar Aug 18 '22 17:08 sunosv

I have never used Lychee on Windows so this will be difficult to help. can you check that:

  • you have a .env file
  • that you have php-mysql installed (it mentions innoDB)

ildyria avatar Aug 18 '22 18:08 ildyria

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.

qwerty287 avatar Aug 19 '22 05:08 qwerty287

@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

sunosv avatar Aug 19 '22 08:08 sunosv

There are 3 different download methods:

  1. clone using git
  2. Download a ZIP from the releases page (Lychee.zip, NOT Source code.zip)
  3. 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?

qwerty287 avatar Aug 19 '22 09:08 qwerty287

Also note that MySQL 5.7.8 is the minimum supported version for Lychee 4.5.3.

d7415 avatar Aug 19 '22 09:08 d7415

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 `. Your lock file does not contain a compatible set of packages. Please run composer 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.`

sunosv avatar Aug 19 '22 10:08 sunosv

Also note that MySQL 5.7.8 is the minimum supported version for Lychee 4.5.3.

Thanks

sunosv avatar Aug 19 '22 10:08 sunosv

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)

qwerty287 avatar Nov 06 '22 19:11 qwerty287