[草稿]configure 常见报错

[TOC]

configure 报错

场景01:configure: error: no acceptable C compiler found in $PATH

  • 症状:编译安装 postgresql-16.6 报错如下,因为pg依赖gcc环境
configure: error: no acceptable C compiler found in $PATH
  • 解决方案:yum安装 gcc
yum install -y gcc
gcc --version

场景02:configure: error: ICU library not found

  • 症状:编译安装 postgresql-16.6 报错如下
checking for icu-uc icu-i18n... no
configure: error: ICU library not found
  • 解决方案:yum安装 icu
yum install -y libicu-devel
icu-config --version

场景03:configure: error: Perl not found

  • 症状:编译安装 postgresql-16.6 报错如下,编译参数 ./configure --with-perl
configure: error: Perl not found
  • 解决方案:yum安装 perl-ExtUtils-Embed
yum install -y perl-ExtUtils-Embed

场景04:configure: error: library 'crypto' is required for OpenSSL

  • 症状:编译安装 postgresql-16.6 报错如下,编译参数 ./configure --with-openssl
checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL
  • 解决方案:yum安装 openssl openssl-devel
yum install -y openssl openssl-devel

场景05:configure: error: zlib library not found

  • 症状:编译安装 postgresql-16.6 报错如下
checking for inflate in -lz... no
configure: error: zlib library not found
  • 解决方案:yum安装 zlib zlib-devel
yum install -y zlib zlib-devel

场景06:configure: error: library 'xml2' (version >= 2.6.23) is required for XML support

  • 症状:编译安装 postgresql-16.6 报错如下
checking for xmlSaveToBuffer in -lxml2... no
configure: error: library 'xml2' (version >= 2.6.23) is required for XML support
  • 解决方案:yum安装 libxml2 libxml2-devel
yum install -y libxml2 libxml2-devel

场景07:configure: error: Tcl shell not found

  • 症状:编译安装 postgresql-16.6 报错如下,编译参数 ./configure --with-tcl
configure: error: Tcl shell not found
  • 解决方案:yum安装 tcl tcl-devel
yum install -y tcl tcl-devel

场景08:configure: error: header file is required for LDAP

  • 症状:编译安装 postgresql-16.6 报错如下
checking for ldap.h... no
configure: error: header file is required for LDAP
  • 解决方案:yum安装 openldap openldap-devel
yum install -y openldap openldap-devel

场景09:configure: error: header file is required for Python

  • 症状:编译安装 postgresql-16.6 报错如下,编译参数 ./configure --with-python
checking for Python.h... no
configure: error: header file <Python.h> is required for Python
  • 解决方案:yum安装 python python-devel
yum install -y python python-devel

场景10:configure: error: library 'pq' is required

  • 症状:编译安装 pgbackrest-2.54.0 报错如下,编译参数 ./configure
checking for PQconnectdb in -lpq... no
configure: error: library 'pq' is required
  • 解决方案:yum安装 postgresql-devel
yum install -y postgresql-devel

场景11:configure: error: library 'xml2' is required

  • 症状:编译安装 pgbackrest-2.54.0 报错如下,编译参数 ./configure
No package 'libxml-2.0' found
checking for xmlSaveToBuffer in -lxml2... no
configure: error: library 'xml2' is required
  • 解决方案:yum安装 libxml2-devel
yum install -y libxml2-devel

场景12:configure: error: library 'yaml' is required

  • 症状:编译安装 pgbackrest-2.54.0 报错如下,编译参数 ./configure
checking for yaml_parser_initialize in -lyaml... no
configure: error: library 'yaml' is required
  • 解决方案:yum安装 libyaml-devel
yum install -y libyaml-devel

场景13:configure: error: library 'bz2' is required

  • 症状:编译安装 pgbackrest-2.54.0 报错如下,编译参数 ./configure
checking for BZ2_bzCompress in -lbz2... no
configure: error: library 'bz2' is required
  • 解决方案:yum安装 bzip2-devel
yum install -y bzip2-devel

场景14:configure: error: * A compiler with support for C++11 language features is required.

  • 症状:编译安装 gcc-12.4.0 报错如下,编译参数 ./configure
configure: error: *** A compiler with support for C++11 language features is required.
  • 解决方案:yum安装gcc编译器以支持c++11
yum install -y gcc-c++ gcc

场景15:configure: failed to find compiler

  • 症状:编译安装 fio-3.38 报错如下,编译参数 ./configure
[root@localhost fio-fio-3.38]# ./configure
configure: failed to find compiler
  • 解决方案:yum安装gcc编译器
yum install -y gcc

config 报错

场景01:You need Perl 5.

  • 症状:编译安装 openssl-1.1.1g 报错如下,编译参数 ./config
[root@localhost openssl-1.1.1g]# ./config
Operating system: x86_64-whatever-linux2
You need Perl 5.
  • 解决方案:yum安装 perl
yum install -y perl

场景02:Can't locate IPC/Cmd.pm in @INC

  • 症状:编译安装 openssl 3.1.2 报错如下,编译参数 ./config
[root@localhost openssl-3.1.2]# ./config --prefix=/usr/local/openssl3
Can't locate IPC/Cmd.pm in @INC (@INC contains: /opt/openssl-3.1.2/util/perl /usr/local/lib64/perl5 ...) at /opt/openssl-3.1.2/util/perl/OpenSSL/config.pm line 19.
BEGIN failed--compilation aborted at /opt/openssl-3.1.2/util/perl/OpenSSL/config.pm line 19.
Compilation failed in require at /opt/openssl-3.1.2/Configure line 23.
BEGIN failed--compilation aborted at /opt/openssl-3.1.2/Configure line 23.
  • 解决办法:yum安装 perl-IPC-Cmd
yum install -y perl-IPC-Cmd

make 报错

场景01:error: 'OPENSSL_INIT_LOAD_CONFIG' undeclared

  • 症状:编译安装 pgbackrest 2.54.0 报错如下,编译参数 make
common/crypto/common.c:63:26: error: ‘OPENSSL_INIT_LOAD_CONFIG’ undeclared (first use in this function)
make: *** [.build/common/crypto/common.o] Error 1
  • 解决方案:将 openssl 版本从 1.0.2k 升级到 1.1.1g,因为 pgbackrest 2.54.0 要求 Require OpenSSL >= 1.1.1看这里
[root@localhost ~]# openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017

#.升级openssl过程略

[root@localhost ~]# openssl version
OpenSSL 1.1.1g  21 Apr 2020

场景02:Can't locate Data/Dumper.pm in @INC

  • 症状:编译安装 openssl 3.4.0 报错如下,编译参数 make
DEBUG: CMAKECONFIGDIR = . => CMAKECONFIGDIR = /opt/openssl-3.4.0, CMAKECONFIGDIR_REL_LIBDIR = .
/usr/bin/perl "-I." "-Mconfigdata" "-Mbuilddata" "util/dofile.pl" "-oMakefile" exporters/cmake/OpenSSLConfig.cmake.in > OpenSSLConfig.cmake
Can't locate Data/Dumper.pm in @INC (@INC contains: Configurations . /opt/openssl-3.4.0/util/../Configurations ...) at exporters/cmake/OpenSSLConfig.cmake.in line 5.
BEGIN failed--compilation aborted at exporters/cmake/OpenSSLConfig.cmake.in line 5.
make: *** [OpenSSLConfig.cmake] Error 1
  • 解决办法:yum安装 perl-Data-Dumper
yum install -y perl-Data-Dumper
Copyright © www.sqlfans.cn 2024 All Right Reserved更新时间: 2024-12-17 18:39:08

results matching ""

    No results matching ""