nginx编译安装出现的常见错误

这篇具有很好参考价值的文章主要介绍了nginx编译安装出现的常见错误。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1、./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=

option.

这个错误是由于您正在尝试编译nginx并启用HTTP重写模块,但系统缺少PCRE库。有几种解决方案可以解决这个问题:

安装系统上的PCRE库。在Ubuntu / Debian上,您可以使用以下命令:

sudo apt-get install libpcre3 libpcre3-dev

在CentOS / RedHat上,您可以使用以下命令安装PCRE:

sudo yum install pcre pcre-devel

如果您无法在系统上安装PCRE,则可以使用–with-pcre =

选项静态构建PCRE库。将

替换为PCRE源代码的路径。

./configure --with-pcre=/usr/local/src/pcre-8.44

这将在编译期间构建一个静态PCRE库,以便nginx可以使用它以启用HTTP重写模块。

希望这些解决方案可以帮助您解决问题。

2、./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=

option.

这个错误是因为您正在尝试编译nginx并启用SSL模块,但系统缺少OpenSSL库。有几种解决方案可以解决这个问题:

安装系统上的OpenSSL库。在Ubuntu / Debian上,您可以使用以下命令

sudo apt-get install libssl-dev

在CentOS / RedHat上,您可以使用以下命令安装OpenSSL:

sudo yum install openssl openssl-devel

如果您无法在系统上安装OpenSSL,可以使用–with-openssl =

选项从源代码构建OpenSSL库。将

替换为OpenSSL源代码的路径。

./configure --with-openssl=/usr/local/src/openssl-1.1.1j

这将在编译期间构建一个静态OpenSSL库以便nginx可以使用它以启用SSL模块。

希望这些解决方案可以帮助您解决问题。

3、./configure: error: the HTTP XSLT module requires the libxml2/libxslt
libraries. You can either do not enable the module or install the libraries.

这个错误是因为您正在尝试编译nginx并启用HTTP XSLT模块,但系统缺少libxml2 / libxslt库。有几种解决方案可以解决这个问题:

安装系统上的libxml2 / libxslt库。在Ubuntu / Debian上,您可以使用以下命令:

sudo apt-get install libxml2-dev libxslt1-dev

在CentOS / RedHat上,您可以使用以下命令安装libxml2 / libxslt:

sudo yum install libxml2 libxml2-devel libxslt libxslt-devel

如果您无法在系统上安装这些库,则需要从源代码构建它们。将libxml2和libxslt源代码下载到本地计算机,然后使用以下命令将它们构建并设置动态链接库:

cd libxml2-2.X.X
./configure --prefix=/usr/local/libxml2
make && make install

cd ../libxslt-1.1.X
export PKG_CONFIG_PATH=/usr/local/libxml2/lib/pkgconfig
./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2
make && make install

执行nginx configure命令时,将–with-http_xslt_module和–with-libxslt=

选项传递给nginx以启用XSLT模块。将

替换为libxslt库的源代码路径。

./configure --with-http_xslt_module --with-libxslt=/usr/local/src/libxslt-1.1.X

希望这些解决方案可以帮助您解决问题。

4、./configure: error: the HTTP image filter module requires the GD library.
You can either do not enable the module or install the libraries.

这个错误是因为您正在尝试编译nginx并启用HTTP image filter模块,但系统缺少GD库。有几种解决方案可以解决这个问题:

通过使用–without-http_image_filter_module选项禁用HTTP image filter模块。

安装系统上的GD库。在Ubuntu / Debian上,您可以使用以下命令:

sudo apt-get install libgd-dev

在CentOS / RedHat上,您可以使用以下命令安装GD库:

sudo yum install gd gd-devel

如果您无法在系统上安装libgd,则需要从源代码构建它。将libgd源代码下载到本地计算机,然后使用以下命令将其构建并安装它:

cd libgd-X.X.X
./configure --prefix=/usr/local/libgd --with-jpeg=/usr/local
make && make install

注意:如果您的系统上没有安装JPEG库,则需要提前安装。

执行nginx configure命令时,将–with-http_image_filter_module和–with-http_gd_module=

选项传递给nginx以启用image filter模块。将

替换为GD库的源代码路径。

./configure --with-http_image_filter_module --with-http_gd_module=/usr/local/src/libgd-X.X.X

希望这些解决方案可以帮助您解决问题。

5、./configure: error: perl module ExtUtils::Embed is required

这个错误是因为您正在尝试编译nginx并启用Perl模块,但系统缺少Perl模块ExtUtils::Embed。使用以下步骤解决此问题:

安装perl模块ExtUtils::Embed。在Ubuntu / Debian上,您可以使用以下命令:

sudo apt-get install libextutils-embed-perl

在CentOS / RedHat上,您可以使用以下命令安装ExtUtils::Embed:

sudo yum install perl-ExtUtils-Embed

执行完成后重新运行nginx configure并尝试编译即可。

希望这些解决方案可以帮助您解决问题。

6、./configure: error: the Google perftools module requires the Google perftools
library. You can either do not enable the module or install the library

这个错误是因为您正在尝试编译nginx并启用Google perftools模块,但系统缺少Google perftools库。使用以下步骤来解决这个问题:

在Ubuntu / Debian上,您可以使用以下命令安装Google perftools库

sudo apt-get install libgoogle-perftools-dev

在CentOS / RedHat上,您可以使用以下命令来安装Google perftools库:

sudo yum install google-perftools google-perftools-devel

执行完成后重新运行nginx configure并尝试编译即可。

希望这些解决方案可以帮助您解决问题。文章来源地址https://www.toymoban.com/news/detail-494769.html

到了这里,关于nginx编译安装出现的常见错误的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Linux驱动编译报错ERROR: Kernel configuration is invalid怎么办

    Linux驱动编译报错ERROR: Kernel configuration is invalid怎么办 报错信息 RROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run ‘make oldconfig make prepare’ on kernel src to fix it. WARNING: Symbol version dump ./Module.symvers is missing; modules will have no dependencies and modversi

    2024年02月11日
    浏览(49)
  • linux 通过docker进行build编译nginx时现./configure报-bash: ./configure: No such file or directory

    我们前端程序是通过nginx代理的,我们前后端都是通过docker来管理的 今天要将前端包和 nginx实例话的,在我的dockerFile文件里面有一个命令,就是将一个nginx.tar.gz包复制到/usr/local目录下然后解压,这个nginx.tar.gz里面包含了这个。/configure文件,结果在执行一个编译命令的时候报

    2024年02月07日
    浏览(27)
  • 解决 python 错误 Configure: Error: No Acceptable C Compiler Found in $PATH

    当你安装一个包或应用程序时,有几个依赖项可以运行这样的包。 这些依赖项为包的某些(或全部)部分提供支持。 通常,其中一些依赖项会捆绑在一起或在安装过程中下载。 其他时候,它应该存在于您的系统中。 对于 Linux,一个重要的例子是安装 Python 时。 C 编译器是它

    2024年02月04日
    浏览(51)
  • UG安装问题:载入Java VM时Windows出现错误:2 and 初始化错误NX License Error:The desired vendor daemon is down。[-97]

    在网上找了很多方法,最后成功的方法来源这篇文章,https://jingyan.baidu.com/article/1e5468f9ae0c84484961b7e5.html。 在运行Launch.exe中Install License Server时,直接使用SPLMLicenseServer_v6.4.2_win64_setup.exe来运行即可, 在程序所在目录行输入cmd,运行代码 即可成功解决问题。 将ugslmd.exe文件放入

    2024年02月10日
    浏览(168)
  • Nginx增加SSL证书时报错:/configure: error: SSL modules require the OpenSSL library.

    /configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl= option. 步骤1:先看下是否安装OpenSSL依赖 注意:nginx不是全局的话需要到nginx的sbin里面执行

    2024年02月05日
    浏览(37)
  • nginx报错:./configure: error: SSL modules require the OpenSSL library. You can either

    nginx报错:./configure: error: SSL modules require the OpenSSL library. You can either 在nginx中配置监听443端口后重新加载配置文件出现此报错, 原因:未安装 ngx_http_ssl_module 模块 解决方法:

    2024年02月05日
    浏览(37)
  • 宝塔面板迁移错误:nginx: [emerg] unknown “connection_upgrade“ variablenginx: configuration file /www/server/

    具体报错如下: 在宝塔面板使用API一件迁移,发现大部分网站都迁移错误。 文字提示: 失败: 站点[xxx.xxx.xxx]创建失败, ERROR: 检测到配置文件有错误,请先排除后再操作 nginx: [emerg] unknown \\\"connection_upgrade\\\" variable nginx: configuration file /www/server/nginx/conf/nginx.conf test failed 解决方案:

    2024年01月21日
    浏览(68)
  • 安装docker-compose出现错误html: No such file or directory syntax error near unexpected token `<‘ <head><t

    安装docker-compose出现 /usr/local/bin/docker-compose: line 1: html: No such file or directory /usr/local/bin/docker-compose: line 2: syntax error near unexpected token \\\' \\\'usr/local/bin/docker-compose: line 2: 502 Bad Gateway 错误 解决 重新安装docker-compose,国内的有些快捷方式有些是有问题的,可能短期内能够使用,时间长

    2024年02月12日
    浏览(34)
  • 使用vivado出现的常见错误

    一般打开和你自己电脑安装的不是同一个版本的工程时,会出现以下错误 目前在使用vivado2019.2和vivado2018.2调试FPGA,在调试过程中遇到不少问题,在此对这些常见错误进行总结: 为了排除vivado版本的问题,我直接重新下了一个2018.2 1、在IMPLEMENTATION过程中,出现Place Design erro

    2024年02月02日
    浏览(26)
  • Nginx出现403错误,应该怎么解决

    Nginx出现403错误,应该怎么解决 Nginx在实际工作中扮演了多重角色,包括Web服务器、反向代理服务器、负载均衡器、静态资源服务器、缓存服务器以及SSL/TLS终结点等。其高性能、可靠性和灵活性使得Nginx成为现代应用架构中不可或缺的组件,帮助提供高效、安全且可扩展的服

    2024年02月08日
    浏览(33)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包