1、在github 上面 git clone 一个RN 项目代码,npm install (yarn)后,准备运行iOS工程,发现'config.h' file not found ,恶心!!!

百度发现:这个是常见错误,只需要在项目根目录下(里面包含node_modules文件夹)运行以下命令(下面的两行同时复制,终端运行)即可解决:

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

../../scripts/ios-configure-glog.sh

注意:具体的版本号要根据报错的提示来定

2、20190225 发现 'glog/logging.h' file not found 的问题(RN 版本 0.58),解决方式(参照上面的,复制下面2行,终端执行):

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

../../scripts/ios-configure-glog.sh

3、讨厌的错误,如下:

configure: error: C compiler cannot create executables

See `config.log' for more details

这个很是令人讨厌!!!出现的原因可能也不一致,下面列举不同时间出现的问题,解决方案和猜想。

20181123运行正常的项目,突然间就出现了config.h' file not found。按照上面的解决方式解决后,运行正常。第二天升级了mac 系统到macOS Mojave (版本10.14);Xcode 更新到Version 10.1 (10B61) 后,又出现了

configure: error: C compiler cannot create executables

See `config.log' for more details

当时百度上说是要安装 GCC 。就用:brew install gcc 安装了下最新版本的gcc 。但是安装完了之后,依然报如下错误(郁闷):

xcrun: error: SDK "iphoneos" cannot be located

xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'

configure: error: C compiler cannot create executables

See `config.log' for more details

最后有效解决方案:

打开xcode...,偏好设置 ,如下图,command line tools 要选中一个 (这个可能是当时安装了两个版本的XCODE,导致没有选择一个)。

20190313 发现glog/logging.h' file not found 问题后,按照上面20190225问题解决,却出现了 关键词如下的错误:

configure: error: C compiler cannot create executables

See `config.log' for more details

过程描述:前几天还是正常运行的,只是换了一个模拟器的机子,就出现了glog/logging.h' file not found ,按照上面的方式执行脚本,但是执行的过程中,出现了 configure: error: C compiler cannot create executables 问题。

解决方法及猜想: 1、glog/logging.h' file not found出现可能跟换模拟器有关(只是猜想)2、configure: error: C compiler cannot create executables 的出现可能跟刚才执行的另外一个RN项目有关,终端在开着另外一个RN项目的本地服务。解决方式:将终端关闭,再次运行项目,一切OK 。

React Native 'config.h' file not found 问题、 'glog/logging.h' file not found 问题、configure: error: C compiler cannot create executables问题解决过程记录的更多相关文章

  1. 安装RabbitMQ编译erlang时,checking for c compiler default output file name... configure:error:C compiler cannot create executables See 'config.log' for more details.

    checking for c compiler default output file name... configure:error:C compiler cannot create executa ...

  2. 将React Native 集成进现有OC项目中(过程记录) 、jsCodeLocation 生成方式总结

    将RN集成到现有OC项目应该是最常见的,特别是已经有OC项目的,不太可能会去专门搞个纯RN的项目.又因为RN不同版本,引用的依赖可能不尽相同,所以特别说明下,本文参考的文档是React Native ...

  3. Swift Modules for React Native

    React Native is an Objective-C application framework that bridges JavaScript applications running in ...

  4. React Native纯干货总结

    随着项目也渐渐到了尾声,之前的项目是mobile开发,采用的是React Native.为即将要开始做RN项目或者已经做过的小伙伴可以参考借鉴,也顺便自己做一下之前项目的总结. 文章比较长,可以选择自 ...

  5. React Native在window下的环境搭建(一)

    React Native官方开发文档 以下是本人抄录的: 初次接触React Native感觉和React很像,却是有点类似,但不完全是,React Native有自己的组件对象,不过它也自定义的组件 ...

  6. 深入浅出React Native 1: 环境配置

    该教程主要介绍如何用react native来开发iOS,所以首先,你需要有一台mac,当然黑苹果也是可以的~ 创建一个react native的项目只需要安装以下五个组件~~(但....坑爹的是,不 ...

  7. React Native iOS环境搭建

    前段时间React Native for Android发布,感觉React Native会越来越多的公司开始研究.使用.所以周六也抽空搭建了iOS的开发环境,以便以后利用空闲的时间能够学习一下. 废 ...

  8. [书籍精读]《React Native精解与实战》精读笔记分享

    写在前面 书籍介绍:本书由架构师撰写,包含ReactNative框架底层原理,以及与iOS.Android混合开发案例,精选了大量实例代码,方便读者快速学习.主要内容分为两大部分,第1部分" ...

  9. React Native新项目启动报错'React/RCTBridgeDelegate.h' file not found

    React Native版本:0.60.4 解决方法: cd ios pod deintegrate pod install 然后重新启动就好了(示例页面变样了( ⊙ o ⊙ )) END------ ...

随机推荐

  1. 乘风破浪:LeetCode真题_025_Reverse Nodes in k-Group

    乘风破浪:LeetCode真题_025_Reverse Nodes in k-Group 一.前言 将一个链表按照一定的长度切成几部分,然后每部分进行翻转以后再拼接成一个链表是比较困难的,但是这也能锻 ...

  2. November 02nd, 2017 Week 44th Thursday

    Knowledge is weightless, a treasure you can always carry easily. 知识没有重量,她是我们可以很容易携带的珍宝. Knowledge is ...

  3. python第三十九课——面向对象(二)之初始化属性

    设计Car类,初始化属性speed,提供一个run函数 import time class Car: def __init__(self,speed): self.speed=speed #将Road ...

  4. Opatching PSU in Oracle Database 11g Release 2 RAC on RHEL6

    Opatching PSU in Oracle Database 11g Release 2(11.2.0.4) RAC on RHEL6 1) 升级opatch工具 1.1) For GI home ...

  5. ThreadLocal解决SimpleDateFormat多线程安全问题中遇到的困惑

    测试代码: public class Main { public static void main(String[] args) { for (int k = 0; k < 10; k++) { ...

  6. apache出现You don’t have permission to access / on this server问题的解决

    今天在部署一个系统时,在apache中新开了一个VirtualHost,然后设置了DocumentRoot,等访问时却提示“You don’t have permission to access / ...

  7. [SQL123] Oracle SQL 统计一定时间间隔内的数据

    --Group by State_ts "per X minutes"select to_char(state_ts, 'hh24')||':'||floor(to_char(st ...

  8. oracle常见受权与回收权限 grant和revoke

    1.GRANT 赋于权限 常用的系统权限集合有以下三个: CONNECT(基本的连接),   RESOURCE(程序开发),   DBA(数据库管理) 常用的数据对象权限有以下五个: ALL   ON ...

  9. 七,ESP8266-UDP(基于Lua脚本语言)

    https://www.cnblogs.com/yangfengwu/p/7533302.html 那天朋友问我为什么有UDP Sever 和 UDP Client   ,,我说:每个人想的不一样,设 ...

  10. mysql中查看一个字段中,有几个逗号

    利用replace.length的内置函数