Composer执行Laravel更新/安装时curl error 28问题求助
Composer执行Laravel更新/安装时curl error 28问题排查记录
已尝试的解决方法
- 重装Composer
- 重装XAMPP
- 切换IPv6为IPv4——暂时解决问题
- 同一网络下另一台电脑测试——问题依旧
- 将GitHub Token保存到composer.json,出现新错误
- 尝试使用VPN
- GitHub克隆Laravel后更新composer autoload,仍随机出现相同错误,涉及laravel/symfony等组件
- 按Stack Overflow教程修改php.ini:未找到
;extension=php_fileinfo.dll,仅发现未注释的extension=fileinfo - 针对超时问题,将
extension_max从120改为360(设备内存16G) - 咨询在线PHP训练营成员,无人遇到此问题,无法提供帮助
相关错误日志
- Downloading laravel/sail (v1.16.2) Failed to download symfony/http-foundation from dist: curl error 28 while downloading https://api.github.com/repos/symfony/http-foundation/zipball/90f5d9726942db69490fe467a3acb5e7154fd555: Operation timed out after 10008 milliseconds with 0 out of 0 bytes received Now trying to download from source - Syncing symfony/http-foundation (v6.1.5) into cache Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+Mom+2022-10-06+2353 to retrieve a token. This token will have read-only permission for public information only. When you need to access _private_ GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+Mom+2022-10-06+2353 Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer. Tokens will be stored in plain text in "C:/Users/whowe/AppData/Roaming/Composer/auth.json" for future use by Composer. For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth Token (hidden):
后续尝试结果
按建议查看Composer官方文档IPv6章节后,仍出现类似超时错误:
Downloading laravel/laravel (v9.3.8) Failed to download laravel/laravel from dist: curl error 28 while downloading api.github.com/repos/laravel/laravel/zipball/…: Operation timed out after 10005 milliseconds with 0 out of 0 bytes received Now trying to download from source
(可提供所有操作步骤截图)
最终情况
后来所有限制解除后问题自行解决,推测真正解决方法与代理有关(2022年10月31日)
内容的提问来源于stack exchange,提问作者میم شین
相关产品推荐
相关产品推荐

