如何通过 iOS 的 React Native 环境设置来安装 boost?

问题描述 投票:0回答:1

我目前正在尝试在 React Native 版本 0.73 中启动一个项目,但是当我在 iOS 目录中

pod install
时遇到问题,特别是在安装 boost 版本 1.83.0 时。

(node:66063) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[Codegen] Found rncore
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[Hermes] Using release tarball from URL: https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.73.1/react-native-artifacts-0.73.1-hermes-ios-debug.tar.gz
Downloading dependencies
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.73.1)
Installing FBReactNativeSpec (0.73.1)
Installing Flipper (0.201.0)
Installing Flipper-Boost-iOSX (1.76.0.1.11)
Installing Flipper-DoubleConversion (3.2.0.1)
Installing Flipper-Fmt (7.1.7)
Installing Flipper-Folly (2.6.10)
Installing Flipper-Glog (0.5.0.5)
Installing Flipper-PeerTalk (0.0.4)
Installing FlipperKit (0.201.0)
Installing OpenSSL-Universal (1.1.1100)
Installing RCT-Folly (2022.05.16.00)
Installing RCTRequired (0.73.1)
Installing RCTTypeSafety (0.73.1)
Installing React (0.73.1)
Installing React-Codegen (0.73.1)
Installing React-Core (0.73.1)
Installing React-CoreModules (0.73.1)
Installing React-Fabric (0.73.1)
Installing React-FabricImage (0.73.1)
Installing React-ImageManager (0.73.1)
Installing React-Mapbuffer (0.73.1)
Installing React-NativeModulesApple (0.73.1)
Installing React-RCTActionSheet (0.73.1)
Installing React-RCTAnimation (0.73.1)
Installing React-RCTAppDelegate (0.73.1)
Installing React-RCTBlob (0.73.1)
Installing React-RCTFabric (0.73.1)
Installing React-RCTImage (0.73.1)
Installing React-RCTLinking (0.73.1)
Installing React-RCTNetwork (0.73.1)
Installing React-RCTSettings (0.73.1)
Installing React-RCTText (0.73.1)
Installing React-RCTVibration (0.73.1)
Installing React-callinvoker (0.73.1)
Installing React-cxxreact (0.73.1)
Installing React-debug (0.73.1)
Installing React-graphics (0.73.1)
Installing React-hermes (0.73.1)
Installing React-jserrorhandler (0.73.1)
Installing React-jsi (0.73.1)
Installing React-jsiexecutor (0.73.1)
Installing React-jsinspector (0.73.1)
Installing React-logger (0.73.1)
Installing React-nativeconfig (0.73.1)
Installing React-perflogger (0.73.1)
Installing React-rendererdebug (0.73.1)
Installing React-rncore (0.73.1)
Installing React-runtimeexecutor (0.73.1)
Installing React-runtimescheduler (0.73.1)
Installing React-utils (0.73.1)
Installing ReactCommon (0.73.1)
Installing SocketRocket (0.6.1)
Installing Yoga (1.14.0)
Installing boost (1.83.0)

[!] Error installing boost
Verification checksum was incorrect, expected 6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e, got 5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff

我尝试关注一些关于如何使用 M1 芯片设置 React Native 的博客,但结果不成功:https://medium.com/@alberto.schiabel/how-to-fix-pod-install-error-in -react-native-on-mac-m1-5d79dc52f7e8

Xcode 命令行工具:Xcode 14.3.1 节点:21.5.0 macOS:文图拉 13.5

node.js react-native npm boost cocoapods
1个回答
0
投票

移至node_modules/react-native/third-party-podspecs。 只换线

spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2',
:sha256 => '6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e' }

spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.bz2',
:sha256 => '6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e' }

也许 jfrog 关闭了他们的服务器

© www.soinside.com 2019 - 2024. All rights reserved.