銀河麒麟系統部署keepalived.故障處理

chenoracle發表於2023-03-02

keepliaved安裝,報錯如下

  !!! OpenSSL is not properly installed on your system. !!!
  !!! Can not include OpenSSL headers files.            !!!

作業系統資訊如下:  

oracle@CJC-DB-01:/home/oracle$nkvers 
############## Kylin Linux Version #################
Release:
Kylin Linux Advanced Server release V10 (Tercel)
Kernel:
4.19.90-23.30.v2101.ky10.x86_64
Build:
Kylin Linux Advanced Server
release V10 (SP1) /(Tercel)-x86_64-Build20/20210518
#################################################

安裝過程如下:

root@CJC-DB-001:/soft/keepalived/keepalived-2.0.15#./configure  --prefix=/usr/local/keepalived
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for strip... strip
checking for ldd... ldd
checking for ar... ar
checking the archiver (ar) interface... ar
checking diagnostic pragmas in functions... yes
checking diagnostic push/pop pragmas... yes
checking for -Wall... yes
checking for -Wextra... yes
checking for -Wunused... yes
checking for -Wstrict-prototypes... yes
checking for -Walloca... yes
checking for -Walloc-zero... yes
checking for -Wbad-function-cast... yes
checking for -Wcast-qual... yes
checking for -Wchkp... yes
checking for -Wdate-time... yes
checking for -Wdisabled-optimization... yes
checking for -Wduplicated-branches... yes
checking for -Wduplicated-cond... yes
checking for -Wfloat-conversion... yes
checking for -Wfloat-equal... yes
checking for -Wimplicit-fallthrough=3... yes
checking for -Winit-self... yes
checking for -Winline... yes
checking for -Wjump-misses-init... yes
checking for -Wlogical-op... yes
checking for -Wmissing-declarations... yes
checking for -Wmissing-prototypes... yes
checking for -Wnested-externs... yes
checking for -Wnormalized... yes
checking for -Wnull-dereference... yes
checking for -Wold-style-definition... yes
checking for -Woverlength-strings... yes
checking for -Wpointer-arith... yes
checking for -Wredundant-decls... yes
checking for -Wshadow... yes
checking for -Wshift-overflow=2... yes
checking for -Wstack-protector... yes
checking for -Wstrict-overflow=4... yes
checking for -Wstrict-prototypes... yes
checking for -Wstringop-overflow=2... yes
checking for -Wstringop-truncation... no
checking for -Wsuggest-attribute=cold... no
checking for -Wsuggest-attribute=const... yes
checking for -Wsuggest-attribute=format... yes
checking for -Wsuggest-attribute=malloc... no
checking for -Wsuggest-attribute=noreturn... yes
checking for -Wsuggest-attribute=pure... yes
checking for -Wtrampolines... yes
checking for -Wundef... yes
checking for -Wuninitialized... yes
checking for -Wunsuffixed-float-constants... yes
checking for -Wunused-const-variable=2... yes
checking for -Wunused-macros... yes
checking for -Wvariadic-macros... yes
checking for PIE support... yes
checking for -Wformat -Werror=format-security support... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 support... yes
checking for -fexceptions support... yes
checking for -fstack-protector-strong support... yes
checking for --param=ssp-buffer-size=4 support... yes
checking for -grecord-gcc-switches support... yes
checking for -Wl,-z,relro support... yes
checking for -Wl,-z,now support... yes
checking for -O2 support... yes
checking for unaligned memory access... yes
checking for clock_gettime() requires -lrt... no
checking whether fpclassify() requires -lm... no
checking how to run the C preprocessor... gcc -E
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking linux/ethtool.h usability... yes
checking linux/ethtool.h presence... yes
checking for linux/ethtool.h... yes
checking linux/icmpv6.h usability... yes
checking linux/icmpv6.h presence... yes
checking for linux/icmpv6.h... yes
checking linux/if_ether.h usability... yes
checking linux/if_ether.h presence... yes
checking for linux/if_ether.h... yes
checking linux/if_packet.h usability... yes
checking linux/if_packet.h presence... yes
checking for linux/if_packet.h... yes
checking linux/ip.h usability... yes
checking linux/ip.h presence... yes
checking for linux/ip.h... yes
checking linux/sockios.h usability... yes
checking linux/sockios.h presence... yes
checking for linux/sockios.h... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking for linux/fib_rules.h... yes
checking for linux/if_addr.h... yes
checking for linux/if_link.h... yes
checking for linux/if_arp.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for int64_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for an ANSI C-conforming const... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for dup2... yes
checking for getcwd... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for select... yes
checking for setenv... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strpbrk... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
checking for uname... yes
checking for pipe2... yes
checking for signalfd... yes
checking for inotify_init1... yes
checking for vsyslog... yes
checking for epoll_create1... yes
checking whether ETHERTYPE_IPV6 is declared... yes
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
configure: error: 
  !!! OpenSSL is not properly installed on your system. !!!
  !!! Can not include OpenSSL headers files.            !!!

下載openssl相關安裝包

root@CJC-DB-001:/soft/openssl#ls -lrth
total 6.9M
-rw-r--r-- 1 root root 446K Feb 24 14:32 openssl-1.1.1f-2.ky10.x86_64.rpm
-rw-r--r-- 1 root root  28K Feb 24 14:32 openssl-ibmpkcs11-1.0.2-1.ky10.ky10.x86_64.rpm
-rw-r--r-- 1 root root  58K Feb 24 14:32 openssl-pkcs11-0.4.10-1.ky10.x86_64.rpm
-rw-r--r-- 1 root root 100K Feb 24 14:32 openssl-pkcs11-devel-0.4.10-1.ky10.x86_64.rpm
-rw-r--r-- 1 root root 1.8M Feb 24 14:32 openssl-devel-1.1.1f-2.ky10.x86_64.rpm
-rw-r--r-- 1 root root 1.4M Feb 24 14:32 openssl-libs-1.1.1f-2.ky10.x86_64.rpm
-rw-r--r-- 1 root root 3.2M Feb 24 14:32 openssl-help-1.1.1f-2.ky10.noarch.rpm
root@CJC-DB-001:/soft/openssl#

root@CJC-DB-001:/soft/openssl#md5sum *
f37f521185b3fd97bf9cf83a135e9ee7  openssl-1.1.1f-2.ky10.x86_64.rpm
9cb10196f5bca569c83b3e51a749dd8d  openssl-devel-1.1.1f-2.ky10.x86_64.rpm
716a827fac2bc647c7266f53a26c45a0  openssl-help-1.1.1f-2.ky10.noarch.rpm
695c918aa543195fb76097a4168e66fc  openssl-ibmpkcs11-1.0.2-1.ky10.ky10.x86_64.rpm
f12e609c100c82e602286fab2539441a  openssl-libs-1.1.1f-2.ky10.x86_64.rpm
200370a9729ea435a53a963ec1f73558  openssl-pkcs11-0.4.10-1.ky10.x86_64.rpm
44793b085b851eb27c714392be92236a  openssl-pkcs11-devel-0.4.10-1.ky10.x86_64.rpm

嘗試手動安裝,存在多個依賴關係

root@CJC-DB-001:/soft/openssl#rpm -ivh openssl-devel-1.1.1f-2.ky10.x86_64.rpm 
warning: openssl-devel-1.1.1f-2.ky10.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 7a486d9f: NOKEY
error: Failed dependencies:
        krb5-devel is needed by openssl-devel-1:1.1.1f-2.ky10.x86_64
        openssl-libs(x86-64) = 1:1.1.1f-2.ky10 is needed by openssl-devel-1:1.1.1f-2.ky10.x86_64
root@CJC-DB-001:/soft/openssl#rpm -ivh openssl-1.1.1f-2.ky10.x86_64.rpm 
warning: openssl-1.1.1f-2.ky10.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 7a486d9f: NOKEY
error: Failed dependencies:
        openssl-libs(x86-64) = 1:1.1.1f-2.ky10 is needed by openssl-1:1.1.1f-2.ky10.x86_64
root@CJC-DB-001:/soft/openssl#rpm -ivh *.rpm
warning: openssl-1.1.1f-2.ky10.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 7a486d9f: NOKEY
error: Failed dependencies:
        krb5-devel is needed by openssl-devel-1:1.1.1f-2.ky10.x86_64
        opencryptoki-libs(x86-64) is needed by openssl-ibmpkcs11-1.0.2-1.ky10.ky10.x86_64
root@CJC-DB-001:/soft/openssl#rpm -ivh openssl-libs-1.1.1f-2.ky10.x86_64.rpm 
warning: openssl-libs-1.1.1f-2.ky10.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 7a486d9f: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
        package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64 (which is newer than openssl-libs-1:1.1.1f-2.ky10.x86_64) is already installed
        file /usr/lib64/.libcrypto.so.1.1.1f.hmac from install of openssl-libs-1:1.1.1f-2.ky10.x86_64 conflicts with file from package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64
        file /usr/lib64/.libssl.so.1.1.1f.hmac from install of openssl-libs-1:1.1.1f-2.ky10.x86_64 conflicts with file from package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64
        file /usr/lib64/engines-1.1/afalg.so from install of openssl-libs-1:1.1.1f-2.ky10.x86_64 conflicts with file from package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64
        file /usr/lib64/engines-1.1/capi.so from install of openssl-libs-1:1.1.1f-2.ky10.x86_64 conflicts with file from package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64
        file /usr/lib64/engines-1.1/padlock.so from install of openssl-libs-1:1.1.1f-2.ky10.x86_64 conflicts with file from package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64
        file /usr/lib64/libcrypto.so.1.1.1f from install of openssl-libs-1:1.1.1f-2.ky10.x86_64 conflicts with file from package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64
        file /usr/lib64/libssl.so.1.1.1f from install of openssl-libs-1:1.1.1f-2.ky10.x86_64 conflicts with file from package openssl-libs-1:1.1.1f-4.p09.ky10.x86_64

配置yum

root@CJC-DB-001:/soft/openssl#cat /etc/yum.repos.d/soft.repo
[Kylin]
name = Kylinv10  Packages
baseurl = http://192.168.0.100/kylinv10/
enabled = 1
gpgcheck = 0

透過YUM進行安裝openssl

root@CJC-DB-001:/soft/openssl#yum install openssl
Last metadata expiration check: 2:18:30 ago on Tue 28 Feb 2023 01:45:02 PM CST.
Package openssl-1:1.1.1f-4.p09.ky10.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

root@CJC-DB-001:/soft/keepalived/keepalived-2.0.15#yum install openssl-devel
Last metadata expiration check: 2:24:42 ago on Tue 28 Feb 2023 01:45:02 PM CST.
Dependencies resolved.
===================================================================================================================================================
 Package                                  Architecture                Version                                     Repository                  Size
===================================================================================================================================================
Installing:
 openssl-devel                            x86_64                      1:1.1.1f-4.p09.ky10                         Kylin                      1.8 M
Installing dependencies:
 e2fsprogs-devel                          x86_64                      1.45.6-0.p01.ky10                           Kylin                      280 k
 keyutils-libs-devel                      x86_64                      1.5.10-11.ky10                              Kylin                      9.8 k
 libverto-devel                           x86_64                      0.3.1-2.ky10                                Kylin                       16 k
 krb5-devel                               x86_64                      1.18.2-5.ky10                               Kylin                      162 k
Transaction Summary
===================================================================================================================================================
Install  5 Packages
Total download size: 2.2 M
Installed size: 9.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): keyutils-libs-devel-1.5.10-11.ky10.x86_64.rpm                                                               7.4 MB/s | 9.8 kB     00:00    
(2/5): libverto-devel-0.3.1-2.ky10.x86_64.rpm                                                                      7.5 MB/s |  16 kB     00:00    
(3/5): e2fsprogs-devel-1.45.6-0.p01.ky10.x86_64.rpm                                                                 48 MB/s | 280 kB     00:00    
(4/5): krb5-devel-1.18.2-5.ky10.x86_64.rpm                                                                          34 MB/s | 162 kB     00:00    
(5/5): openssl-devel-1.1.1f-4.p09.ky10.x86_64.rpm                                                                  102 MB/s | 1.8 MB     00:00    
---------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                              100 MB/s | 2.2 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                           1/1 
  Installing       : libverto-devel-0.3.1-2.ky10.x86_64                                                                                        1/5 
  Installing       : keyutils-libs-devel-1.5.10-11.ky10.x86_64                                                                                 2/5 
  Installing       : e2fsprogs-devel-1.45.6-0.p01.ky10.x86_64                                                                                  3/5 
  Running scriptlet: e2fsprogs-devel-1.45.6-0.p01.ky10.x86_64                                                                                  3/5 
  Installing       : krb5-devel-1.18.2-5.ky10.x86_64                                                                                           4/5 
  Installing       : openssl-devel-1:1.1.1f-4.p09.ky10.x86_64                                                                                  5/5 
  Running scriptlet: openssl-devel-1:1.1.1f-4.p09.ky10.x86_64                                                                                  5/5 
  Verifying        : e2fsprogs-devel-1.45.6-0.p01.ky10.x86_64                                                                                  1/5 
  Verifying        : keyutils-libs-devel-1.5.10-11.ky10.x86_64                                                                                 2/5 
  Verifying        : libverto-devel-0.3.1-2.ky10.x86_64                                                                                        3/5 
  Verifying        : krb5-devel-1.18.2-5.ky10.x86_64                                                                                           4/5 
  Verifying        : openssl-devel-1:1.1.1f-4.p09.ky10.x86_64                                                                                  5/5 
Installed:
  openssl-devel-1:1.1.1f-4.p09.ky10.x86_64        e2fsprogs-devel-1.45.6-0.p01.ky10.x86_64        keyutils-libs-devel-1.5.10-11.ky10.x86_64       
  libverto-devel-0.3.1-2.ky10.x86_64              krb5-devel-1.18.2-5.ky10.x86_64                
Complete!

再次執行,可以正常安裝

root@CJC-DB-001:/soft/keepalived/keepalived-2.0.15#./configure  --prefix=/usr/local/keepalived
......
Use nftables             : No
init type                : systemd
Strict config checks     : No
Build genhash            : Yes
Build documentation      : No
*** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2937753/,如需轉載,請註明出處,否則將追究法律責任。

相關文章