Meituan-Dianping / Meituan-Dianping/SQLAdvisor

centos7最后make报错的解决方法

Open
#74 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
5.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Linking CXX executable sqladvisor
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libperconaserverclient_r.so: undefined reference to X509_check_ip@libcrypto.so.10' /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libperconaserverclient_r.so: undefined reference to X509_check_host@libcrypto.so.10'
collect2: error: ld returned 1 exit status
make[2]: *** [sqladvisor] Error 1
make[1]: *** [CMakeFiles/sqladvisor.dir/all] Error 2
make: *** [all] Error 2

报错如上。
尝试了ln -s libperconaserverclient_r.so ...方法都没用
后来尝试查看libcrypto.so.10的问题。
lrwxrwxrwx. 1 root root 19 Aug 22 2017 /usr/lib64/libcrypto.so.10 -> libcrypto.so.1.0.1e
尝试对他进行升级
rpm -qa|grep openssl
openssl-1.0.1e-60.el7.x86_64
openssl-libs-1.0.1e-60.el7.x86_64

yum update openssl
………………
Updated:
openssl.x86_64 1:1.0.2k-12.el7

Dependency Updated:
openssl-libs.x86_64 1:1.0.2k-12.el7

再尝试make成功
make
Linking CXX executable sqladvisor
[100%] Built target sqladvisor

希望能解决各位的问题

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported CentOS 7 build output and the libcrypto.so.10 and OpenSSL package details. Check whether the documented dependency or build guidance should cover this linker failure. Done means the guidance is clear enough to address the error and the sqladvisor target reaches 100% successfully with make.

Written by the indexing model from the issue text.

Assessment

Tech stack
centos, cmake, cpp
Domain
build-system, operating-systems
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.