cengit / react-native-issue

react-native related issues found when I working on the RN project development
0 stars 0 forks source link

pod install error: curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to dl.google.com:443 #1

Open cengit opened 3 years ago

cengit commented 3 years ago

pod install

then below error happens

Installing FirebaseAnalytics (7.0.0)

[!] Error installing FirebaseAnalytics
[!] /usr/bin/curl -f -L -o /var/folders/b8/kzzkwdzx6_n0qtdc0xd93v000000gn/T/d20210420-34792-65db7a/file.tgz https://dl.google.com/firebase/ios/analytics/85d51ebb1b58f88f/FirebaseAnalytics-7.0.0.tar.gz --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.10.1 cocoapods-downloader/1.4.0'

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to dl.google.com:443
cengit commented 3 years ago

this is because you can't connect to the dl.google.com when installing, but in my case, I can access the .tar file(https://dl.google.com/firebase/ios/analytics/85d51ebb1b58f88f/FirebaseAnalytics-7.0.0.tar.gz) from chrome. so I download it and upload it to a web-server(https://cenday.com/pod/FirebaseAnalytics-7.0.0.tar.gz) for later use.

so my solution is: change the installing source from dl.google.com to cenday.com (my own server, you can setup one yourself)

step by step on how to change the spec source:

  1. in terminal run pod repo find out your spec-repositories path
    pod repo
    # result
    cocoapods
    - Type: git (master)
    - URL:  https://github.com/CocoaPods/Specs.git
    - Path: /Users/YOUR_NAME/.cocoapods/repos/cocoapods # in my case: /Users/cen/.cocoapods/repos/cocoapods
  2. search the FirebaseAnalytics spec file by name in above path:
    find /Users/cen/.cocoapods/repos/cocoapods/Specs -name FirebaseAnalytics
    # result
    /Users/cen/.cocoapods/repos/cocoapods/Specs/e/2/1/FirebaseAnalytics
  3. goto above directory:
    cd /Users/cen/.cocoapods/repos/cocoapods/Specs/e/2/1/FirebaseAnalytics/7.0.0/ # remember open the version folder
  4. you should see file: FirebaseAnalytics.podspec.json , open it by VScode and change the source url
    
    // old
    {
    "source": {
    "http": "https://dl.google.com/firebase/ios/analytics/85d51ebb1b58f88f/FirebaseAnalytics-7.0.0.tar.gz"
    }
    }

// new: you can use any source you can access. { "source": { "http": "https://cenday.com/pod/FirebaseAnalytics-7.0.0.tar.gz" } }



after you completed above steps, goto ios folder and execute:
pod install

you should be good to go!!! cheers