报错代码1如下:

[root@xiaoming nginx-1.17.]# ./configure --prefix=/soft/nginx-1.17.
checking for OS
+ Linux 3.10.-.el7.x86_64 x86_64
checking for C compiler ... not found ./configure: error: C compiler cc is not found

解决方法:

源码包的编译用到了linux系统里的编译器,通常源码包都是用C语言开发的,这里提示缺少c语言编译器,只需要使用yum仓库安装gcc这个包即可

yum install -y gcc

报错代码2如下:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

解决办法:

缺少pcre库文件

yum install -y pcre-devel

报错代码3:

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

解决方法:

同代码2一样,同样缺少zlib库文件,我们只要安装zlib-devel即可

yum install -y zlib-devel

报错代码3:

nginx: [emerg] getgrnam("www--with-http_ssl_module") failed

解决办法:

由于--group=www与--with-http_ssl_module之间没空格符号分开,导致openssl-devel第一遍装的时候没被使用

1.切换到nginx源码包

# cd /soft/src/nginx-1.17.7

2.查看nginx原有的模块

# /soft/src/nginx-1.17.7/sbin/nginx -V

3.这时候执行/soft/src/nginx-1.17.1/configure指令

4.配置完成后,运行命令make 这里不要进行make install,否则就是覆盖安装

5.然后备份原有已安装好的nginx ,cp /soft/nginx-1.17.7/sbin/nginx /tmp

6.然后将刚刚编译好的nginx覆盖掉原有的nginx(这个时候nginx要停止状态)

cp /soft/src/nginx-1.17.7/sbin/nginx /soft/nginx-1.17.7/sbin/

这时候重启nginx服务即可

linux安装源码包报错的更多相关文章

  1. 【JDK】Linux安装源码包JDK完整步骤

    [JDK]Linux安装源码包JDK完整步骤 1.检查一下系统中的jdk版本 [root@localhost software]# java -version 显示: openjdk version ...

  2. linux安装源码包指定安装目录

    当下载完一个源码包并且解压后 文件夹下会有一个重要的文件configure configure 文件是一个可执行的脚本文件,它将检查目标系统的配置和可用功能,比如一些检查依赖或者启用禁用一些模块,它有 ...

  3. linux的基本操作(RPM包或者安装源码包)

    RPM包或者安装源码包 在windows下安装一个软件很轻松,只要双击.exe的文件,安装提示连续“下一步”即可,然而linux系统下安装一个软件似乎并不那么轻松了,因为我们不是在图形界面下.所以你要 ...

  4. Linux yum源码包安装和卸载

    Linux 下的绝大多数源码包都是用 C 语言编写的,还有少部分是用 C++ 等其他程序语言编写的.所以,要想安装源码包,必须安装 C 语言编译器 gcc(如果是用 C++ 编写的程序,则还需要安装 ...

  5. (转载)Linux如何编译安装源码包软件

    一.什么是源码包软件: 顾名思义,源码包就是源代码的可见的软件包,基于Linux和BSD系统的软件最常见:在国内源可见的软件几乎绝迹:大多开源软件都是国外出品:在国内较为出名的开源软件有fcitx;l ...

  6. 安装 RPM 包或者安装源码包

    安装 RPM 包或者安装源码包 在windows下安装一个软件很轻松,只要双击.exe的文件,安装提示连续“下一步”即可,然而linux系统下安装一个软件似乎并不那么轻松了,因为我们不是在图形界面下. ...

  7. 如何在centos7上安装源码包

    在我们使用linux的过程中,有很多程序是通过红帽官网给的系统中安装的,但是一般来说,系统更新的速度比较慢,如果这个时候我们又想用最新版的该怎么办呢?总不能一直等系统升级吧╮(╯﹏╰)╭所以,我们可以 ...

  8. linux 安装源码后的操作 ldconfig

    https://blog.csdn.net/cqkxboy168/article/details/8657487 知识点: .如果使用 ldd 命令时没有找到对应的共享库文件和其具体位置,可能是两种情 ...

  9. linux安装tomcat后启动报错Cannot find ./catalina.sh的解决方法

    linux安装tomcat后启动报错: Cannot find ./catalina.shThe file is absent or does not have execute permissionT ...

随机推荐

  1. 读书笔记 - js高级程序设计 - 第六章 面向对象的程序设计

      EcmaScript有两种属性 数据属性 和 访问器属性 数据属性有4个特性 Configurable Enumerable Writable Value   前三个值的默认值都为false   ...

  2. ORACLE增删改查以及case when的基本用法

    1.创建table create table test01( id int not null primary key, name ) not null, gender ) not null, age ...

  3. 使用svn时出现Can't switch /XXX/XXX because it is not the repository yet

    问题描述 出现的问题如题目所示. 翻译一下:不能选择这个目录,原因是这个目录还不是svn仓库. 解决办法 这个问题出现的原因是你将项目中的.svn文件夹删除了,一般情况你是可以通过撤销将文件恢复的.如 ...

  4. nodejs(15)express开启cors跨域

    express开启cors跨域 package.json "dependencies": { "body-parser": "^1.18.3" ...

  5. uploadifive使用笔记

    官网地址:http://www.uploadify.com/ uploadifive 是基于H5开发,所以支持移动端和PC端 <input type="file" name= ...

  6. coures包下载和安装 可解决报错ImportError: No module named '_curses'

    http://blog.csdn.net/liyaoqing/article/details/54949253 coures curses 库 ( ncurses )提供了控制字符屏幕的独立于终端的方 ...

  7. UVA 125 统计路径条数 FLOYD

    这道题目折腾了我一个下午,本来我的初步打算是用SPFA(),进行搜索,枚举出发点,看看能到达某个点多少次,就是出发点到该点的路径数,如果出现环,则置为-1,关键在于这个判环过程,如果简单只找到某个点是 ...

  8. [Algo] 117. Array Deduplication III

    Given a sorted integer array, remove duplicate elements. For each group of elements with the same va ...

  9. UML-FURPS+与补充性规格说明

    1.FURPS+ 在统一过程(UP)中,需求按照“FURPS+”模型进行分类. 功能性(Functional):特性.功能.安全性: 可用性(Usability):人性化因素.帮助.文档: 可靠性(R ...

  10. dlib安装踩过的坑

    使用到dlib时遇到了下载错误,不能正常安装 以下是成功安装的记录: 首先打开Anaconda prompt选定一个python环境,安装cmake和boost pip install cmake - ...