Error installing Boost: Verification checksum was incorrect, expected

13.8k Views Asked by At

Error message:

Verification checksum was incorrect, expected 6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e, got 5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff

Steps to reproduce

cd ios & pod install

Output:

React Native Version
0.73.1

Affected Platforms
Build - MacOS

Enter image description here

The error occurred during React Native pod install.

9

There are 9 best solutions below

1
Louay Sleman On

This issue can occur when you have cached files that are corrupted or outdated. You can resolve this by running the following commands:

pod cache clean --all
rm -rf Podfile.lock
pod repo update
pod install
0
Ali Sao On

Change the checksum in boost.podspec for now. Go to node_modules/react-native/third-party-podspecs/boost.podspec.

And replace it with:

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

Pod::Spec.new do |spec|
  spec.name = 'boost'
  spec.version = '1.83.0'
  spec.license = { :type => 'Boost Software License', :file => "LICENSE_1_0.txt" }
  spec.homepage = 'http://www.boost.org'
  spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.'
  spec.authors = 'Rene Rivera'
  # Patched due to issue https://github.com/boostorg/boost/issues/843
  spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.bz2',
                  :sha256 => '6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e' }

  # Pinning to the same version as React.podspec.
  spec.platforms = min_supported_versions
  spec.requires_arc = false

  spec.module_name = 'boost'
  spec.header_dir = 'boost'
  spec.preserve_path = 'boost'
end

For your next install, you can create a patch for the package using patch-package. Instructions can be found here.

2
Agrit07 On

I implemented the changes as suggested in a previous answer, but it really didn't solve the problem. I made a patch of it. It doesn't solve the upstream problem, but it crashes the pod install, somehow.

⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Failed to load 'boost' podspec: 
[!] Invalid `boost.podspec` file: undefined local variable or method `min_supported_versions' for Pod:Module.

 #  from /Users/agrittiwari/wishup/client-app/node_modules/react-native/third-party-podspecs/boost.podspec:17
 #  -------------------------------------------
 #    # Pinning to the same version as React.podspec.
 >    spec.platforms = min_supported_versions
 #    spec.requires_arc = false
 #  -------------------------------------------


pod install --repo-update --ansi exited with non-zero code: 1
0
Sebastian Bárcenas On

It looks like a major problem with JFrog. Here's a patch:

Error installing boost Verification checksum was incorrect #843

0
Ayush Soni On

Run pod update in iOS directory and then start the project.

0
ABDULLAH On

There is a temporary solution on Error installing boost Verification checksum was incorrect #843.

Below are the steps which I followed to solve the Boost issue in React Native. I have 0.70.5 version of React Native in my project.

Step 1: delete folder node_modules, file package-lock.json, pods and podfile.lock

Step 2: Install patch-package (note: it also work with yarn)

npm install --save-dev patch-package postinstall-postinstall

Step 3: npm install

Step 4: Modify your Modify boost.podspec: in directory node_modules/react-native/third-party-podspecs/boost.podspec (Note: if you have a version of React Native higher than 0.70, then change the Boost version to 1.83.0)

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

Pod::Spec.new do |spec|
  spec.name = 'boost'
# change the version below line
  spec.version = '1.76.0'
  spec.license = { :type => 'Boost Software License', :file => "LICENSE_1_0.txt" }
  spec.homepage = 'http://www.boost.org'
  spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.'
  spec.authors = 'Rene Rivera'
https://
  spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
                  :sha256 => 'f0397ba6e982c4450f27bf32a2a8b827c41' }

  # Pinning to the same version as React.podspec.
  spec.platforms = { :ios => '13.0', :tvos => '13.0' }
  spec.requires_arc = false

  spec.module_name = 'boost'
  spec.header_dir = 'boost'
  spec.preserve_path = 'boost'
end

The only changes are in these two lines, else they are the same:

spec.version = '1.76.0'
'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',

Step 5: run the below command to create a patch file based on your changes

npx patch-package react-native

Step 6: Modify your package.json

"scripts": {
  "postinstall": "patch-package"
}

Step 7: run npm install and pod install. patch-package will automatically apply the patch to the boost.podspec file.

Below is my patch file which I created by the above command react-native+0.70.5.patch

diff --git a/node_modules/react-native/third-party-podspecs/boost.podspec b/node_modules/react-native/third-party-podspecs/boost.podspec
index 2f1fcc4..0f83c02 100644
--- a/node_modules/react-native/third-party-podspecs/boost.podspec
+++ b/node_modules/react-native/third-party-podspecs/boost.podspec
@@ -10,11 +10,11 @@ Pod::Spec.new do |spec|
   spec.homepage = 'http://www.boost.org'
   spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.'
   spec.authors = 'Rene Rivera'
-  spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
+  spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2',
                   :sha256 => 'f0397ba6e982c4450f27bf37a5623a14636ea583318c41' }

   # Pinning to the same version as React.podspec.
-  spec.platforms = { :ios => '11.0', :tvos => '11.0' }
+  spec.platforms = { :ios => '13.0', :tvos => '13.0' }
   spec.requires_arc = false

   spec.module_name = 'boost'

Also update podfile iOS version to 13.0 minimum to support Boost 1.76.0. Otherwise you will run into this issue.

Note: The platform of the target App_New (iOS 12.4) may not be compatible with Boost (1.76.0) which has a minimum requirement of iOS 13.0 - tvOS 13.0.

platform: ios, '13.0'
0
Piotr Badura On
1
Jadent On

This issue has now been addressed in React Native release 0.72.9 and 0.72.3

The underlying issue with the Boost dependency is detailed here: https://github.com/facebook/react-native/issues/42110 and https://github.com/facebook/react-native/issues/42180

The issue appears to have been caused by problems with the JFrog dependency repository.

The issue has been resolved by updates to the boost.podspec to pull it from archives.boost.io instead of boostorg.jfrog.io/

If you are using React Native 0.72.x then updating to 0.72.9 should resolve the issue. If you are using React Native 0.73.x then update to at least 0.73.2

0
Md azeem On

I encountered the same issue with React Native version 0.68.2 and managed to resolve it temporarily by following the suggestion below. Navigate to the 'boost.podspec' file and replace the link from:

'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'

to

'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2'

This adjustment helped me address the problem for now.