React native boost library download failed

The prompt is similar to
curl: (56) SSLRead() return error -9806
curl: Saved to filename 'boost_1_63_0.tar.gz'

Reason: The init command will create the latest version by default, and the latest version 0.45 needs to download the boost library for compilation. This library is huge, and it is difficult to download it successfully even if it is scientifically online in China, resulting in many people unable to run iOS projects normally.

Option 1:

It is recommended to temporarily use version 0.44.3.
Solution: Create a project temporarily use react-native init MyApp --version 0.44.3 to specify a certain version.
You can use the --version parameter (note the two bars) to create a project with a specific version. For example react-native init MyApp --version 0.44.3. Note that the version number must be accurate to two decimal points.

Option 2: Scientific Internet access, no good scientific Internet access method has been found.

Option 3: Replace the source
xcode Failed to connect to github-production-release-asset-2e65be.s3.amazonaws.com
$ gem update --system # Please go online here scientifically
$ gem -v
2.6.3

$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
$ gem sources -l
https://gems.ruby-china.org
# Make sure only gems.ruby-china.org

In this solution, only boost0.0.1 is visible on ruby, and the version is not suitable

. Solution 4: Homebrew
installs homebrew first

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master /install)"

and then run
brew install boost
. This will install the latest version. The latest version needs to be tested to see if it affects development. I tested and installed 16.5, but when I run react-native run-ios, I will re-download the 16.3 version


. Solution 5: Cause of the problem:
This address (github-production-release-asset-2e65be.s3.amazonaws.com) needs Some downloads are blocked in China, so you need to set the hosts file and use the server in Hong Kong.

Solution:
In the hosts file, add this line:
219.76.4.4 github-cloud.s3.amazonaws.com

This solution is currently available, but the download time is still quite long, 16.3 is about 12m, but it took more than half an hour to download.

Option 6: Manual download and
installation Refer to
http://blog.csdn.net/jiang_xinxing/article/details/60150346

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326169691&siteId=291194637