CentOS 7 离线环境安装nginx时报错:./configure: error: C compiler cc is not found
先说解决方法:
在nginx目录下,查看objs/autoconf.err文件,该文件记录了具体的错误信息
vi objs/autoconf.err
一般就是缺少一些文件,因为我的gcc、g++也是离线包安装的,打开文件显示如下图

我这个就是没有找到libmpfr.so.4嘛,网上找了个mpfr的rpm包装上去就可以了。
具体情况具体处理,这里主要是说明可以在这个文件里看到具体的报错信息。
找到这个文件主要是想着是不是nginx代码有什么判断没走进去,就想看一下这个错是哪儿报的,然后使用了下面这句命令,在当前文件夹下查找包含"C compiler cc is not found"这句话的文件,结果就意外收获了包含报错信息的文件。
grep -nHIrF "C compiler cc is not found" ./
再一个就是,安装完mpfr之后其实又提示找不到libmpfr.so.6,结果找了好久没找到包含libmpfr.so.6的包。受网友启发,将libmpfr.so.4软链接一下,结果就可以了。
ln -s /usr/lib64/libmpfr.so. /usr/lib64/libmpfr.so.
浪费了一个下午,觉得很亏,看到有不少朋友都有报这个错,希望本文能有所帮助吧。
CentOS 7 离线环境安装nginx时报错:./configure: error: C compiler cc is not found的更多相关文章
- Linux安装Nginx报错: ./configure: error: C compiler cc is not found
CentOS 7.3 下 安装 Nginx 执行配置命令 ./configure 时提示以下错误: checking for OS + Linux 2.6.32-431.el6.x86_64 x86_ ...
- nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的
源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...
- CentOS安装Nginx 报错“configure: error: the HTTP rewrite module requires the PCRE library”解决办法
错误提示: ./configure: error: the HTTP rewrite module requires the PCRE library. yum install gcc gc ...
- 安装mongodb时报错 configure: error: Cannot find OpenSSL's libraries
请安装这些包以便继续: apt-get install build-essential libexpat1-dev libgeoip-dev libpng-dev libpcre3-dev libss ...
- 编译安装nginx报错 checking for C compiler ... not found
编译安装在执行./configure步骤报错,是因为缺少环境变量 checking for C compiler - not found ./configure: error: C compiler ...
- linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.
linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 1 ...
- 编译安装nginx提示./configure: error: C compiler cc is not found
1 编译安装nginx提示如下 ./configure: error: C compiler cc is not found 2 解决办法 yum -y install gcc gcc-c++ aut ...
- Android 开发环境 —— Eclipse 启动时报错:Error when loading the SDK
简述: Eclipse 启动时报错:Error when loading the SDK 错误信息: Error when loading the SDK: Error: Error parsing ...
- Linux(CentOS6.5)下编译安装PHP5.6.22时报错”configure: error: ZLIB extension requires gzgets in zlib”的解决方式(确定已经编译安装Zlib,并已经指定Zlib路径)
本文地址http://comexchan.cnblogs.com/,作者Comex Chan,尊重知识产权,转载请注明出处,谢谢! 今天在CentOS6.5下编译安装PHP时,一直报错 confi ...
随机推荐
- VMware中windows虚拟机的安装流程
1.打开安装的VMware 15,点击新建虚拟机 2.选择典型即可,点击下一步 3.选择“稍后安装操作系统”,点击下一步 4.选择想安的版本,点击下一步 ...
- PAT甲级满分攻略|记一次考试经历
一次考试经历 今天是"大雪",很冷. 来到隔壁的学校考试,记得上一次来河中医是两年前大一刚开学吧,那天晚上印象比较深刻,6个室友骑车到处闲逛.当时还不会Hello world. 很 ...
- 这是一个测试 hello world
第一次写博客,冒着生命危险尝试一下,发说说 搞了半天,发现原创文章在随笔发,我以为在文章目录发,白白在文章那里建了分类,太难了吧我
- 带着canvas去流浪系列之四 绘制散点图
[摘要] 用原生canvasAPI实现百度Echarts图表 示例代码托管在:http://www.github.com/dashnowords/blogs 一. 任务说明 使用原生canvasAPI ...
- CodeChef FAVNUM FavouriteNumbers(AC自动机+数位dp+二分答案)
All submissions for this problem are available. Chef likes numbers and number theory, we all know th ...
- 洛谷 题解 P1372 【又是毕业季I】
这题... 只能说:n / k罢了... 但是: 代码没有最短,只有更短! #include <stdio.h> int n, k; int main() { return scanf(& ...
- vs2017/vs2019 去掉 单击aspx文件预览页面
初次安装vs2017或者vs2019,新建的项目中,每次单击项目文件时,文件自动打开了 然后 打开 工具->选项->环境->选项卡和窗口->预览选项卡->勾掉" ...
- Spring整合Shiro 权限 角色 用户关系分析
Spring整合Shiro 权限 角色 用户关系分析 作者 : Stanley 罗昊 [转载请注明出处和署名,谢谢!] 前置内容 之前我们学习了,使用注解的方式去完成权限的控制,当然,也是静态的,也就 ...
- css3(1)
边框: 盒子圆角:border-radius:5px / 20%: border-radius:5px 4px 3px 2px; 左上,右上,右下,左下. 盒子阴影: box-shadow: box- ...
- 开启mode="history"模式,需要服务端的支持,因为出现“刷新页面报错404”的问题;
mode="history"是去除链接中的'#'的,但是加上后页面刷新回报404错误,怎么办呢? 解决办法:只需要在nginx中最末尾加上 try_files $uri $uri/ ...