macos M1 安装报错记录
问题1
Installing boost (1.83.0)
[!] Error installing boost
Verification checksum was incorrect, expected 6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e, got 5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff
解决方法:
项目下面./node_modules/react-native/third-party-podspecs/boost.podspec
中修改
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' }
问题2
hermes-engine
下载缓慢的问题
# 解决 `hermes-engine` 下载缓慢的问题
# 直接下载安装包 ***.tar.gz,解压
# HERMES_ENGINE_TARBALL_PATH = 解压路径
export HERMES_ENGINE_TARBALL_PATH=/Users/xxx/code/xxx/react-native-artifacts-0.73.2-hermes-ios-debug
pod install
版本信息
npx react-native info
System:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M1
Memory: 201.06 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 21.5.0
path: ~/.nvm/versions/node/v21.5.0/bin/node
Yarn: Not Found
npm:
version: 10.2.4
path: ~/.nvm/versions/node/v21.5.0/bin/npm
Watchman:
version: 2023.12.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 15.1/15C65
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.1
wanted: 0.73.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false