glibc Version Issues for MySql Connector for C++ in Linux

MySQL

For Linux distros, the connector is available as a tar file. The default download link will always show the latest version. What is important to know is the version of glibc that it requires. In the screenshot below, the latest version (as of today), expects glibc to be 2.28.

If you have an older version of Linux, chances are that your installed version of glibc will be older. In which case, your C++ linker will stop with an error: undefined reference to fcntl@glibc2.28

To not get this error, either you will have to upgrade your OS to later version (not practical) or you have to install an older version of the Connector library. To do that, click on the Archives tab in the Connector download page and choose the Connector version that has the matching glibc version as your own OS. For eg.if you have glibc 2.27 then you need to download 8.0.31

In order to know the installed version of glibc in your system, use the command ldd –version

Be the first to comment

Leave a Reply

Your email address will not be published.


*