Libmysqlclient was not found when compiling tars A static library


libmysqlclient. A static library acquisition method

1. Download the source code and compile it

Get the MariaDB source code, download the corresponding source code, and download the addressmariadb-5.5.56.tar.gzAfter downloading, transfer it to the virtual machine, unzip it, and then compile it.

Common libraries required for installation

apt-get install bison 
apt-get install flex
apt-get install ncurse-devel
apt-get install cmake

Compile MariaDB to get libmysqlclient a

tar –zxvf mariadb-5.5.56.tar.gz
cd mariadb-5.5.56
cmake . – LH # view the available options for cmake
cmake . -DCMAKE_INSTALL_PREFIX=/home/mysql
        -DMYSQL_DATADIR=/home/mysqldata -DSYSCONFDIR=/etc 
        -DWITHOUT_TOKUDB=1 -DMYSQL_UNIX_ADDR=/home/tmp/mysql.sock 
        -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_general_ci
make install

After completing the above command, you can get in the / home / MySQL / lib / directory A static library file

2. Directly obtain libmysqlclient A way of

Download the compiled MariaDB file,MariaDB download address

Find the corresponding version. I use Linux, so it corresponds to mariadb-5.5.56-linux-x86_ 64.tar. gz


tar -zxvf mariadb-5.5.56-linux-x86_64.tar.gz

libmysqlclient. The a file is in the Lib folder of the directory

3. Download the libmysqlclient I uploaded directly a

You can find it in the resources in my CSDN

  • Libmysqlclient for 32-bit systems alink
  • Libmysqlclient for 63 bit system alink

Recommended Today

JS generate guid method

JS generate guid method Globally unique identification(GUID) is an algorithm generatedBinaryCount Reg128 bitsNumber ofidentifier , GUID is mainly used in networks or systems with multiple nodes and computers. Ideally, any computational geometry computer cluster will not generate two identical guids, and the total number of guids is2^128In theory, it is difficult to make two […]