问题解决:cannot find -lmysqlclient
解决 Cannot Find 问题
2023-09-14 09:09:11 时间
百度了一会儿,没发现这个标题的解决方案、
看来要靠经验了。
三步走:
1、判断是否已下载 mysqlclient 相关文件,至于是什么相关文件,应该能看得出来吧。
CentOS系统解决方案
2、CentOS系统的话,yum search mysql,找到相关文件,下载并安装。啥?哪个相关文件?搜出来的包不都有释义嘛,不放心呢可以把有嫌疑的都安装了。
3、查看链接是否正常。一般我们编译的时候,编译器是默认去 /usr/lib 下面找库文件的,最多再去 /usr/local/lib 下面看看。
但是当我们手动去翻的时候,又确实没有看到我们想要的库文件。
这时候怎么办呢?明明刚刚下载了一大堆,难道一个都没下载对?
find 一下,找到该文件所在的位置。
我的是在 /usr/lib64/mysql 下。所以就出现了这个问题。
4、解决方案有二:
a、把目标文件复制到库文件搜索路径的文件夹下
b、添加库文件搜索路径
正常安装成功之后,在 /usr/lib 下面会有一个 mysql文件夹,里面有一堆的库,但是就是没有我们想要的那几个,所以,嗯,你懂得
Ubuntu系统解决方案
2、sudo apt-get install mysql-server mysql-client (我想这一步大家都走过了吧,MySQL不安装做什么项目)
3、sudo apt-get install libmysqlclient-dev python3-dev
4、apt install python3-pip
5、pip install mysqlclient
相关文章
- 消息收发弹性——生产集群如何解决大促场景消息收发的弹性&降本诉求
- Hive 数据倾斜原因及解决方法(转)
- 解决WARN:Cannot find template location: classpath:/templates/
- Linux CentOS 6.x报错解决:错误:Cannot retrieve metalink for repository: epel. Please verify its path and tr
- Vue Nuxtjs Cannot set property 'render' of undefined解决方法
- 调用Hybris API时遇到的错误消息Cannot find user with uid如何解决
- 成功解决ImportError: cannot import name ‘adam‘ from ‘tensorflow.python.keras.optimizers‘
- 成功解决internal/modules/cjs/loader.js:596 throw err; ^ Error: Cannot find module 'express'
- 成功解决ERROR: Cannot find command ‘git‘ - do you have ‘git‘ installed and in your PATH?
- 成功解决ImportError: cannot import name ‘StratifiedGroupKFold‘
- 成功解决ImportError: cannot import name ‘_validate_lengths‘
- 成功解决RuntimeError: Selected KDE bandwidth is 0. Cannot estiamte density
- 成功解决Error: Cannot find module 'web3'
- 成功解决ValueError: cannot reindex from a duplicate axis
- 【异常】解决报错[org/springframework/security/web/AuthenticationEntryPoint.class] cannot be opened because
- 已解决ERROR: Cannot find command ‘git’- do you have ‘git’ installed and in your PATH?
- 已解决selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
- 已解决TypeError: the JSON object must be str, bytes or bytearray, not dict
- 已解决ImportError: cannot import name ‘Imputer‘ from ‘sklearn.preprocessing
- 踩坑 - 关于 “cannot be found using the classloader AntClassLoader “的解决方法 --- 已解决
- QSerailPort使用readAll()接收数据不全问题解决
- static用法报错解决:cannot declare member function to have static linkage [-fpermissive](九十二)
- Module build failed: Error: Cannot find module ‘node-sass‘ Require stack报错解决
- 完美解决linux编译动态库出现的问题:ERROR: ld.so: object LD_PRELOAD cannot be preloaded: ignored
- 报错:fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle解决