Ubuntu上GCC编译报错处理:ERROR: CANNOT FIND LIBMYSQLCLIENT_R

版权声明:本博客为思想黑客原创,有问题请联系 微信itgongchengshi https://blog.csdn.net/gumanren/article/details/89435888

报错信息: 

void proxy_serv_callback(void* callback_data, uint8_t msg, uint32_t handle, void* pParam)
                                                                                   ^
[  7%] Linking CXX executable db_proxy_server
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: error: ld returned 1 exit status
CMakeFiles/db_proxy_server.dir/build.make:770: recipe for target 'db_proxy_server' failed
make[2]: *** [db_proxy_server] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/db_proxy_server.dir/all' failed
make[1]: *** [CMakeFiles/db_proxy_server.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
make msfs failed


解决方法:

查找libmysqlclient.so

whereis libmysqlclient.so

输出:

libmysqlclient: /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/x86_64-linux-gnu/libmysqlclient.a

创建软链接
ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/libmysqlclient_r.so

猜你喜欢

转载自blog.csdn.net/gumanren/article/details/89435888