CURL error 28 while downloading Connection timed out after 10000 milliseconds
Asked Answered
S

3

5

I'm trying to install Yajra, a Laravel package to handle server-side works of DataTables jQuery Plugin via AJAX option. But I got this problem and I can't fix this. Please do you have anything to help me?

[Composer\Downloader\TransportException] curl error 28 while downloading https://repo.packagist.org/packages.json: Connection timed out after 10000 milliseconds

Simasimah answered 4/4, 2022 at 18:20 Comment(1)
Does this answer your question? curl error 28 for composer update/install laravelVerein
U
8

I remember i run this command

composer install --ignore-platform-reqs

then CURL error 28 while downloading was resolved.

Upchurch answered 8/12, 2022 at 13:37 Comment(4)
I used this with require and it fixed it. composer require 'drupal/project-name' --ignore-platform-reqsRew
not helps :( error still happens: Failed to download doctrine/inflector from dist: curl error 28 while downloading api.github.com/repos/doctrine/inflector/zipball/…: SSL connection timeout Now trying to download from sourceHerminahermine
Why does this work?Scourge
This doesn’t have anything to do with OP’s errorFetor
B
5

The problem might be caused by DNS issue, try To Flush the DNS Cache by running this command ipconfig /flushdns if you are using Windows.

Buy answered 5/8, 2023 at 15:24 Comment(1)
Using WSL2 and Ubuntu in Windows, I encountered the error described in the question. I opened another Windows Terminal and ran ipconfig /flushdns. I then returned to the Ubuntu window and repeated. No error. I'm upvoting the answer.Lineman
B
1

My solution to this error, when I was trying to build a Laravel app with docker, was to change the MTU on the network configuration of the docker container. This depends on the MTU configuration that the host has, in our case was 1400. We had to apply this configuration for the network on the docker-compose.yaml file:

networks:
  my-net:
    driver: bridge
    driver_opts:
      com.docker.network.driver.mtu: 1400

As suggested in this article: Docker MTU Configuration

And then applied this network to all images in the file like this:

MySQL:
  image: mariadb:10.11
  networks:
    - my-net
Braggart answered 11/7, 2023 at 11:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.