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对 ...
随机推荐
- javascript基础:函数参数与闭包问题
今天在写东西的时候,对函数参数的概念有些模糊,查阅相关资料后,在博客上记点笔记,方便日后复习. 首先,在js中函数参数并没有强语言中那么要求严格,他不介意传递进来多少个参数,也不在乎传进来的参数是什么 ...
- CentOS ./configure && make && make install详解
码的安装一般由3个步骤组成:配置(configure).编译(make).安装(make install). 在Linux中利用源码包安装软件最重要的就是要仔细阅读安装包当中的README INST ...
- DC之setup-hold time详解
转自一下站点: http://www.blogbus.com/bb2hh-logs/20463915.html
- LibreOJ 6280 . 数列分块入门 4
题目链接:https://loj.ac/problem/6280 加一个数组保存块的和. 代码: #include<iostream> #include<cstring> #i ...
- HDU-1002.大数相加(字符串模拟)
本题大意:给出两个1000位以内的大数a 和b,让你计算a + b的值. 本题思路:字符串模拟就能过,会Java的大佬应该不会点进来...... 参考代码: #include <cstdio&g ...
- Class语法糖
TypeScript源码 class A { hello() { } } class B extends A{ welcome() { } } TypeScript编译 var __extends = ...
- MYSQL之水平分区----MySQL partition分区I(5.1)
一. 分区的概念 二. 为什么使用分区?(优点) 三. 分区类型 四. 子分区 五. 对分区进行修改(增加.删除.分解.合并) 六 ...
- 《基于Nginx的中间件架构》学习笔记---4.nginx编译参数详细介绍
通过nginx -V查看编译时参数: 在nginx安装目录下,通过./configure --help,查看对应版本ngnix编译时支持的所有参数: Nginx编译参数详细介绍: --help 显示本 ...
- seek引发的python文件读写的问题
我的需求很简单,就是统计一下我的安装脚本执行的次数和时间,格式是这样的 install_times:1|install_times:2018-09-03 15:58:46 install_times: ...
- 有关html5的history api
从Ajax翻页的问题说起 请想象你正在看一个视频下面的评论,在翻到十几页的时候,你发现一个写得稍长,但非常有趣的评论.正当你想要停下滚轮细看的时候,手残按到了F5.然后,页面刷新了,评论又回到了第一页 ...