Find the location of libmysqlclient.so.X file in Linux environments
I'm putting together a script that has a requirement of knowing libmysqlclient.so.[15|16|18] .so file. It's usually located in /usr/lib/ , /usr/lib64/ or a mysql/ subdirectory of the aforementioned directories.
This will give you all of the libmysql files recognized by the linker. The higher on the list has the higher priority and is more likely to be linked against.
/sbin/ldconfig -p | grep mysql | cut -d\> -f2
One caveat though is that since most applications link by doing a gcc -lmysqlclient they will favor a file in the ldconfig listed as libmysqlclient.so rather than .so.15 or whatever. So personally I would assume that the first libmysqlclient.so is the correct one.
Which shared object library is used depends on the user enviroment and binary that is run. If you su - USER to the user that is running the binary and then run the command ldd MYSQLBINARY | grep mysqlclient that will determine which mysqlclient library is going to be used.
By default on most Linux systems, /usr/lib (used for x86 binaries) and /usr/lib64 (used for x86_64 bit binaries).
Btw, running locate libmysqlclient.so to get a list of all the shared objects that are installed system wide (probably won't report .so files installed in user paths though).
Find the location of libmysqlclient.so.X file in Linux environments的更多相关文章
- Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on Linux
If you are getting this error then you probably reset the permissions on your hidden .ssh directory ...
- Display certain line(s) from a text file in Linux.
Purpose: Display certain line or lines from a text file, such as : Display the 1000th line from file ...
- View epub and mobi File on Linux
Calibre has stand-alone ebook viewer "ebook-viewer", start it in terminal: $ ebook-viewer ...
- yum安装错误:CRITICAL:yum.cli:Config Error: Error accessing file for config file:///home/linux/+
上网搜了一下然后自己总结一份 : 出现原因:yum可能没有,或者损坏 解决: 第一步:下载 wget http://yum.baseurl.org/download/3.2/yum-3.2.28 ...
- Managing IIS Log File Storage
Managing IIS Log File Storage You can manage the amount of server disk space that Internet Informa ...
- How to Run a .Jar Java File
.jar files are used for archiving, archive unpacking. One of the essential features of jar file is l ...
- Linux/Unix shell 监控Oracle告警日志(monitor alter log file)
使用shell脚本实现对Oracle数据库的监控与管理将大大简化DBA的工作负担,如常见的对实例的监控,监听的监控,告警日志的监控,以及数据库的备份,AWR report的自动邮件等.本文给出Linu ...
- Sharing The Application Tier File System in Oracle E-Business Suite Release 12.2
The most current version of this document can be obtained in My Oracle Support Knowledge Document 13 ...
- Java-Io之文件File
File是"文件"和"目录路径名"的抽象表示形式.File之间继承Object,实现了Serializable和Comparable接口,因此文件支持File对 ...
随机推荐
- centos 7 下 TFTP服务器安装
一.介绍 TFTP(Trivial File Transfer Protocol,简单文件传输协议)),是一个基于UDP 协议 69端口 实现的用于在客户机和服务器之间进行简单文件传输的协议提供不复杂 ...
- NumPy 数学函数
NumPy 数学函数 NumPy 包含大量的各种数学运算的函数,包括三角函数,算术运算的函数,复数处理函数等. 三角函数 NumPy 提供了标准的三角函数:sin().cos().tan(). 实例 ...
- 侯捷STL课程及源码剖析学习2: allocator
以STL 的运用角度而言,空间配置器是最不需要介绍的东西,它总是隐藏在一切组件(更具体地说是指容器,container)的背后,默默工作默默付出. 一.分配器测试 测试代码 #include < ...
- PAT1020 (已知中序,后序遍历转前序遍历)
已知后序与中序输出前序(先序):后序:3, 4, 2, 6, 5, 1(左右根)中序:3, 2, 4, 1, 6, 5(左根右) 已知一棵二叉树,输出前,中,后时我们采用递归的方式.同样也应该利用递归 ...
- ADB 运行原理
ADB基本命令和简介 ADB就是Android Debug Bridge,Android调试桥的意思,很形象.需要在电脑上安装SDK Platform Tools 对应的版本才能使用 基于ADB的工具 ...
- Max Points on a Line (HASH TABLE
QUESTIONGiven n points on a 2D plane, find the maximum number of points that lie on the same straigh ...
- 【git】日志提交规范
我自己总结的规范: feature: 功能添加bugfix: bug修复change: 调整,比如配置,某些方法替换等optimize: 优化过程doc: 文档变更refactor: 重构,功能不变t ...
- css控制div上浮下落
CSS3 示例:http://www.w3school.com.cn/cssref/pr_keyframes.asp 以下是代码: <!DOCTYPE html> <html> ...
- mac navicat premium 使用技巧
快捷键 CMD-I:对象信息 CMD-L:查询日志 CMD-Y:新建查询 SHIFT-CMD-T:数据传输 SHIFT-CMD-C:命令列界面
- Django配置后台xadmin管理界面
Django配置后台xadmin管理界面 python版本3.6.5 Django版本1.10.8(刚开始是2.1.5,由于各种错误,改成了低版本) 1.xadmin的安装,下载地址https://g ...