Composer报错: require(): Failed opening required ‘.../markbaker/matrix/.../functions/adjoint.php‘

简介: Composer报错: require(): Failed opening required ‘.../markbaker/matrix/.../functions/adjoint.php‘

问题详情


今天在使用artisan启动laravel项目的时候,出现了如下错误:

PHP Warning:  require(D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php): failed to open stream: No such file or directory in D:\Code\project\vendor\composer\autoload_real.php on line 71
Warning: require(D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php): failed to open stream: No such file or directory in D:\Code\project\vendor\composer\autoload_real.php on line 71
PHP Fatal error:  require(): Failed opening required 'D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php' (include_path='.;C:\php\pear') in D:\Code\project\vendor\composer\autoload_real.php on line
 71
Fatal error: require(): Failed opening required 'D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php' (include_path='.;C:\php\pear') in D:\Code\project\vendor\composer\autoload_real.php on line 71

解决思路


注:以下三种情况都有可能解决这个错误,根据自己情况进行尝试

首先判断是否是缓存造成的,运行composer clearcache命令进行缓存清除后,运行项目还是会报相同错误

D:\Code\project>composer clearcache
Cache directory does not exist (cache-vcs-dir): 
Clearing cache (cache-repo-dir): C:\Users\fish\AppData\Local\Composer\repo
Clearing cache (cache-files-dir): C:\Users\fish\AppData\Local\Composer\files
Clearing cache (cache-dir): C:\Users\fish\AppData\Local\Composer
All caches cleared.

然后把vendor目录删掉,使用composer install重新安装整个项目依赖,结果在安装完成后生成composer自动加载文件时还是报相同错误

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
PHP Warning:  Uncaught ErrorException: require(D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php): failed to open stream: No such file or directory in D:\Code\project\vendor\composer\autoload_real
.php:71
Stack trace:
#0 D:\Code\project\vendor\composer\autoload_real.php(71): Composer\Util\ErrorHandler::handle(2, 'require(D:\\Code...', 'D:\\Code\\project...', 71, Array)
#1 D:\Code\project\vendor\composer\autoload_real.php(71): require()
#2 D:\Code\project\vendor\composer\autoload_real.php(61): composerRequire9980c9e77675d25d9ea71e3db2d349ab('9d8e013a5160a09...', 'D:\\Code\\project...')
#3 D:\Code\project\vendor\autoload.php(7): ComposerAutoloaderInit9980c9e77675d25d9ea71e3db2d349ab::getLoader()
#4 D:\Code\project\vendor\laravel\framework\src\Illuminate\Foundation\ComposerScripts.php(43): require_once('D:\\Code\\project...')
#5 phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(323): Illuminate\Foundation\ComposerScripts::postAutoloadDump( in D:\Code\project\vendor\composer\autoload_real.php on line 71
Warning: Uncaught ErrorException: require(D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php): failed to open stream: No such file or directory in D:\Code\project\vendor\composer\autoload_real.php:
71
Stack trace:
#0 D:\Code\project\vendor\composer\autoload_real.php(71): Composer\Util\ErrorHandler::handle(2, 'require(D:\\Code...', 'D:\\Code\\project...', 71, Array)
#1 D:\Code\project\vendor\composer\autoload_real.php(71): require()
#2 D:\Code\project\vendor\composer\autoload_real.php(61): composerRequire9980c9e77675d25d9ea71e3db2d349ab('9d8e013a5160a09...', 'D:\\Code\\project...')
#3 D:\Code\project\vendor\autoload.php(7): ComposerAutoloaderInit9980c9e77675d25d9ea71e3db2d349ab::getLoader()
#4 D:\Code\project\vendor\laravel\framework\src\Illuminate\Foundation\ComposerScripts.php(43): require_once('D:\\Code\\project...')
#5 phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(323): Illuminate\Foundation\ComposerScripts::postAutoloadDump( in D:\Code\project\vendor\composer\autoload_real.php on line 71
PHP Fatal error:  composerRequire9980c9e77675d25d9ea71e3db2d349ab(): Failed opening required 'D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php' (include_path='.;C:\php\pear') in D:\Code\ssadmin\v
endor\composer\autoload_real.php on line 71
Fatal error: composerRequire9980c9e77675d25d9ea71e3db2d349ab(): Failed opening required 'D:\Code\project\vendor\composer/../markbaker/matrix/classes/src/functions/adjoint.php' (include_path='.;C:\php\pear') in D:\Code\project\vendor
\composer\autoload_real.php on line 71

最后直接运行composer update进行项目扩展更新,成功更新,并且项目运行成功!

目录
相关文章
|
2月前
|
应用服务中间件 Shell PHP
pbootcms模板报错提示PHP Warning: Unknown: open_basedir restriction
pbootcms模板报错提示PHP Warning: Unknown: open_basedir restriction
|
4月前
|
PHP
PHP——oneinstack重新安装PHP的时候报错
PHP——oneinstack重新安装PHP的时候报错
76 4
|
4月前
|
存储 安全 Linux
【Azure 应用服务】App Service For Linux 怎么安装Composer,怎么安装PHP扩展,怎么来修改站点根路径启动程序?
【Azure 应用服务】App Service For Linux 怎么安装Composer,怎么安装PHP扩展,怎么来修改站点根路径启动程序?
|
4月前
|
敏捷开发 数据可视化 测试技术
阿里云云效产品使用合集之怎么在php composer安装自己服务器的代码
云效作为一款全面覆盖研发全生命周期管理的云端效能平台,致力于帮助企业实现高效协同、敏捷研发和持续交付。本合集收集整理了用户在使用云效过程中遇到的常见问题,问题涉及项目创建与管理、需求规划与迭代、代码托管与版本控制、自动化测试、持续集成与发布等方面。
|
4月前
|
PHP
PHP——安装ThinkPHP框架报错
PHP——安装ThinkPHP框架报错
56 0
|
6月前
|
PHP
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
261 1
|
6月前
|
Ubuntu PHP
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure
111 1
|
5月前
|
PHP 开发者
如何用Composer管理PHP项目的第三方扩展包
【7月更文挑战第2天】**Composer 是PHP开发的关键工具,用于管理项目依赖。安装需PHP 5.6.4+,通过官网脚本安装。在项目根目录创建 `composer.json` 文件定义依赖,使用 `composer require` 命令安装扩展包,如Guzzle。`composer.lock` 保证版本一致。`require_once 'vendor/autoload.php';` 实现自动加载。更新依赖用 `composer update`,管理依赖提升效率和项目维护性。深入学习可发掘更多高级功能。**
176 0
|
6月前
|
PHP 数据库
phpMyAdmin报错 in ./libraries/config/FormDisplay.php#661 continue targeting switch is equivalent to
phpMyAdmin报错 in ./libraries/config/FormDisplay.php#661 continue targeting switch is equivalent to
51 0
|
7月前
|
PHP
PHP显示报错提示,开启display_errors的方法
PHP显示报错提示,开启display_errors的方法
168 0