React Native Error config.h file not found mutex.h During Archive

Today I am going to share the solution to the common error that most of the React Native developers are facing. This error occurs when we run React Native App in IOS or Archive App using Xcode. Its a glog error saying config.h file not found mutex.h. The Screenshot of the error in the following.

config.h file not found mutex.h

Solution: “config.h file not found mutex.h Error”

This error happens when glog is not configured properly in your React Native Project. To solve this error follow the steps below.

Step 1:

First better to remove node_modules Directory & clean cache. For that run the following commands one by one in your main React Native project directory.

$ rm -rf node_modules/
$ yarn cache clean
$ yarn install

Step 2:

Now we need to run “” script that is present inside “node_modules/react-native/scripts/” directory. For that run the following command.

$ node_modules/react-native/scripts/

Step 3:

The above command will create a folder named “third-party” inside “node_modules/react-native/” directory. Now we need to navigate the third-party/glog directory and configure glog. For that run the following commands.

cd node_modules/react-native/third-party/glog-0.3.5

The above command can vary, depending upon your installed glog version. It can be “glog-0.3.5” or “glog-0.3.4”. You can check the exact directory name of the glog directory in your finder.

Now after navigating to the glog directory in your terminal run the following commands one by one.

$ ./configure
$ make
$ make install

That’s it. Now you can open your project in Xcode, Clean and rebuild it. It should not show “config.h file not found mutex.h” error again.


Run React Native App on a Specific Device or Simulator

Please share this post:
Native Mobile Application Developer (Android + IOS) having experience in Java, Swift, Kotlin, Objective C, Unity, C#, C/C++, NODE JS & PHP.

Ask a Question

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

%d bloggers like this: