1, mysql installation, please refer to the following link:

Centos7 Procedure for installing mysql

2. Poco compilation process:

Tar -xvf poco-1.10.1-release.tar.gz CD poco-poco-1.10.1-release mkdir mybuild && CD mybuild cmake.. -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON make && make installCopy the code

3. Solve problems in compilation process

  • Question 1:
[ 95%] Linking CXX shared library .. /.. /lib/libPocoDataMySQLd.so /usr/bin/ld:/usr/local/mysql/lib/libmysqlclient.so: file format not recognized; treating as linker script /usr/bin/ld:/usr/local/mysql/lib/libmysqlclient.so:1: syntax error collect2: error: ld returned 1 exit status make[2]: *** [lib/libPocoDataMySQLd.so.71] Error 1 make[1]: *** [Data/MySQL/CMakeFiles/DataMySQL.dir/all] Error 2 make: *** [all] Error 2Copy the code
  • Cause of the problem:
The binary packages of mysql are in glibc2.12 and glibc2.17 versions. At the beginning of the installation, I installed version 2.12 mindless, but actually my system is glibc version 2.17, which leads to the above problems.Copy the code
  • Solutions:
Run the following command to rewrite the glibc2.17 version, for example, mysql-8.0.21-linux-glibc2.17-x86_64-minimal. Tar PS: Run the LDD --version command to check the glibc version of the local OSCopy the code

  • Question 2:
/usr/local/mysql/lib/libmysqlclient.so: undefined reference to `SSL_CTX_set_ciphersuites@OPENSSL_1_1_1'
/usr/local/mysql/lib/libmysqlclient.so: undefined reference to `BIO_set_callback_ex@OPENSSL_1_1_1'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/DataMySQL-testrunner] Error 1
make[1]: *** [Data/MySQL/testsuite/CMakeFiles/DataMySQL-testrunner.dir/all] Error 2
make: *** [all] Error 2
Copy the code
  • Cause of the problem:
The local system does not support OpenSSL 1.1.1.Copy the code
  • Solutions:
Install OpenSSL 1.1.1, download the openSSL-OpenSSL_1_1_1. zip source package, and decompress it. /config make make install PS: If the installed library is not in the environment variable, add it. PS: Linux environment variable is set method reference: https://www.jianshu.com/p/d1e3fa6dbd7cCopy the code