2019-09-07 15:16:55 35次浏览 0条回答 0 悬赏 10 金钱

完整报错 :[RuntimeException] Could not scan for classes inside "/mnt/www/hdxq/api-test/yii2-api/vendor/phpunit/php-file-iterator/src/" which does not appear to be a file nor a folder

linux 服务器执行 php composer.phar install ,出现以下三个报错

  1. Failed to execute unzip -qq '/mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-swiftmailer/3f34b1c3c654d612d6 dd4f9c2018cc2f' -d '/mnt/www/hdxq/api-test/yii2-api/vendor/composer/0656f9a3'

[/mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-swiftmailer/3f34b1c3c654d612d6dd4f9c2018cc2f] 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 /mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-swiftmailer/3f34 b1c3c654d612d6dd4f9c2018cc2f or

    /mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-swiftmailer/3f34b1c3c654d612d6dd4f9c2018cc2f.zip, and ca                                                                                                                         nnot find /mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-swiftmailer/3f34b1c3c654d612d6dd4f9c2018cc2f.ZIP, peri                                                                                                                         od.

The archive may contain identical file names with different capitalization (which fails on case insensitive file                                                                                                                         systems)
Unzip with unzip command failed, falling back to ZipArchive class
  1. Failed to execute unzip -qq '/mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-debug/a6a54c510c50787cc85f7bdd 5d4557fc' -d '/mnt/www/hdxq/api-test/yii2-api/vendor/composer/e31c9161'

[/mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-debug/a6a54c510c50787cc85f7bdd5d4557fc] 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 /mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-debug/a6a54c510c 50787cc85f7bdd5d4557fc or

    /mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-debug/a6a54c510c50787cc85f7bdd5d4557fc.zip, and cannot f                                                                                                                         ind /mnt/www/hdxq/api-test/yii2-api/vendor/yiisoft/yii2-debug/a6a54c510c50787cc85f7bdd5d4557fc.ZIP, period.

The archive may contain identical file names with different capitalization (which fails on case insensitive file                                                                                                                         systems)
Unzip with unzip command failed, falling back to ZipArchive class

3. [RuntimeException] Could not scan for classes inside "/mnt/www/hdxq/api-test/yii2-api/vendor/phpunit/php-file-iterator/src/" which does not appear to be a file nor a folder

本地没有任何问题, 服务器之前也没有任何问题

补充于 2019-09-07 16:02

在技术交流群里得到解答,原因是compose的缓存内容出现问题了,在第一次install后,之后初始化操作都是从缓存读取相关内容,一旦缓存文件出问题,那么我们的的初始化就会有问题,

解决方法:
1.删除composer的缓存 ,服务器上执行 composer clear-cache (或者 php composer.phar clear-cache ),也可以删除 ~/.composer/cache 这里的文件夹,
2.删除vendor文件夹
3.重新执行初始化操作 composer install(或者 php composer.phar install)

亿速云
    没有找到数据。
您需要登录后才可以回答。登录 | 立即注册
箜篌恋风
实习生

箜篌恋风

注册时间:2019-09-07
最后登录:2019-09-12
在线时长:0小时41分
  • 粉丝0
  • 金钱15
  • 威望0
  • 积分15

热门问题