Laravel 8 fresh installation not working: Class 'PhpOption\Option' not found

Viewed 841

Below is the output of a fresh installation of Laravel:


[/var/www/html/test4/vendor/composer/tmp-ed822182c73474415c6181ce09df6586]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /var/www/html/test4/vendor/composer/tmp-ed822182c73474415c6181ce09df6586 or
        /var/www/html/test4/vendor/composer/tmp-ed822182c73474415c6181ce09df6586.zip, and cannot find /var/www/html/test4/vendor/composer/tmp-ed822182c73474415c6181ce09df6586.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
 10/94 [==>-------------------------]  10%    Failed to extract tijsverkoyen/css-to-inline-styles: (9) unzip -qq  '/var/www/html/test4/vendor/composer/tmp-b80112c562042eee55d68b50c3df303d' -d '/var/www/html/test4/vendor/composer/a656904a'

[/var/www/html/test4/vendor/composer/tmp-b80112c562042eee55d68b50c3df303d]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /var/www/html/test4/vendor/composer/tmp-b80112c562042eee55d68b50c3df303d or
        /var/www/html/test4/vendor/composer/tmp-b80112c562042eee55d68b50c3df303d.zip, and cannot find /var/www/html/test4/vendor/composer/tmp-b80112c562042eee55d68b50c3df303d.ZIP, period.

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
65 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
PHP Fatal error:  Uncaught Error: Class 'PhpOption\Option' not found in /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Support/Env.php:76
Stack trace:
#0 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1022): Illuminate\Support\Env::get()
#1 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(940): Illuminate\Foundation\Application->normalizeCachePath()
#2 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php(57): Illuminate\Foundation\Application->getCachedServicesPath()
#3 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php(45): Illuminate\Foundation\ComposerScripts::clearCompiled()
#4 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(323): Illuminate\Foundation\ComposerScripts::postAutoloadDump()
#5 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(219): Composer\EventDispatcher\EventDispatcher->executeEv in /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Support/Env.php on line 76

Fatal error: Uncaught Error: Class 'PhpOption\Option' not found in /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Support/Env.php:76
Stack trace:
#0 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1022): Illuminate\Support\Env::get()
#1 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(940): Illuminate\Foundation\Application->normalizeCachePath()
#2 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php(57): Illuminate\Foundation\Application->getCachedServicesPath()
#3 /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php(45): Illuminate\Foundation\ComposerScripts::clearCompiled()
#4 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(323): Illuminate\Foundation\ComposerScripts::postAutoloadDump()
#5 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(219): Composer\EventDispatcher\EventDispatcher->executeEv in /var/www/html/test4/vendor/laravel/framework/src/Illuminate/Support/Env.php on line 76

I've removed and re-installed laravel and composer and I'm stuck. Help!! I'm not sure why "Class 'PhpOption\Option' not found" is happening.

When I try to install PHPOptions separately the same thing is happening.

0 Answers
Related