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对 ...
随机推荐
- cef研究
// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights // reserved. Use of this s ...
- L2与L1正则化理解
https://www.zhihu.com/question/37096933/answer/70507353 https://blog.csdn.net/red_stone1/article/det ...
- pep8 && pep20
pep8(部分,遇到问题再补充) 1.不建议使用tab键来空格,避免不必要的空格.操作符左右各加一个空格,函数默认参数使用的赋值符左右省略空格. 2.类和top-level函数定义之间空两行:类中的方 ...
- [Unity3D]降低向Shader中传值的开销
Unity3D中提供了很多API用于向shader传值,这篇文章对比测试了两类不同的使用方法的性能. 正文 Unity3D中,通过C#代码向shader传值有两种方式. 一种是面向具体的materia ...
- RxJS之BehaviorSubject
Subject 的其中一个变体就是 BehaviorSubject,它有一个“当前值”的概念.它保存了发送给消费者的最新值.并且当有新的观察者订阅时,会立即从 BehaviorSubject 那接收到 ...
- CentOS常用的文件操作命令总结
我可以说是linux操作新手,有些命令经常忘记,特别是对文件的某些操作,经常要翻阅之前的笔记,今天把之前在百度上整理的“CentOS常用的文件操作命令”转载到我的新博客上面,以供后面查阅! 博客后面还 ...
- f5版本升级
1)上传系统IOS及Hotfix 点击import按钮,选择要上传的文件.上传成功的话就会显示上传成功的10.2.4的iso文件 2)通过CLI命令行方式上传补丁 通过SSH工具将ISO以及Hotfi ...
- http406错误
The resource identified by this request is only capable of generating responses with characteristics ...
- js文字展示各种滚动效果
js文字展示各种滚动效果:http://www.dowebok.com/demo/188/
- win下apache的error.log和access.log文件过大
在httpd.conf中修改ErrorLog和CustomLog的配置 ErrorLog "|E:/apache2.2/bin/rotatelogs.exe E:/apache2.2/log ...