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对 ...
随机推荐
- window中磁盘空间不足但是找不到使用空间的文件
今天看到 电脑的 d盘 空间爆红,空间满了,去找了找没有找到具体是哪个文件占用的空间.一个一个文件的查看属性,都没有找到.文件都不大,几百个g的空间就没了.莫名其妙!!! 自己开启了备份还原,存储的 ...
- Docker学习之安装mysql
1.从Docker检索mysql镜像 指令: docker search mysql 2.镜像下载 指令: docker pull mysql:5.7.19 3.查看本地镜像列表 指令: docker ...
- CodeForces - 920C Swap Adjacent Elements
传送门:点我 You have an array a consisting of n integers. Each integer from 1 to n appears exactly once i ...
- Codeforces Beta Round #42 (Div. 2)
Codeforces Beta Round #42 (Div. 2) http://codeforces.com/contest/43 A #include<bits/stdc++.h> ...
- Win10 安装 Anaconda3 用 Anaconda3 安装TensorFlow 1.2 (只支持python3.5)
Win10 安装 Anaconda3 1.安装Anaconda3 选择相应的Anaconda进行安装,下载地址点击这里,下载对应系统版本的Anaconda,官网现在的版本是Anaconda 4.3.1 ...
- f5单台安装配置
1.对设备的管理口进行配置 管理口的默认设置 •IP 地址: 192.168.1.245/24 2.用户名和密码 1)初始密码: 图形界面用户名/密码:admin/admin:命令行用户名/密码:ro ...
- python函数的万能参数
我们通过一个简单的事例来展示一下函数的万能参数,我们先写一个最简单的函数 def test(*args,**kwargs): print(args,kwargs) 然后定义两个变量 l = [1,2, ...
- eclipse配置mybatis xml文件自动提示(转)
原文链接 原文如下: 如果使用eclipse中,再写mybatis的xml文件的时候,没有提示,用“Alt+/”,不能把代码用快捷键敲出来,可以试试下面要说的这种方法,反正我试了,我这个可以. 1.下 ...
- java_2变量和运算符
1.变量 存储数据的容器. 2.变量创建的3要素 数据类型 变量名 = 变量值: 如int a = 10; 3.数据类型的自动转化 当小范围变量向大范围变量转化的时候,会发生这种情况.如int类型变 ...
- mysqldump 导出数据库各参数详细说明
mysqldump是mysql用于转存储数据库的实用程序.它主要产生一个SQL脚本,其中包含从头重新创建数据库所必需的命令CREATE TABLE INSERT等. 下面我们详细介绍一下mysqldu ...