Error loading MySQLdb module: libmysqlclient.so.20: cannot open shared object file: No such file or directory

后端 未结 6 970
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 04:02

I had a running django project and for some reasons I had to remove the current mysql version and install a different MySQL version in my machine.

But now when I am try

6条回答
  •  Happy的楠姐
    2021-02-04 04:35

    In my case the problem was caused by Ubuntu upgrades, so I can't find libmysqlclient.so.20 in /usr/lib/x86_64-linux-gnu.

    Solution:

    1. Check existance libmysqlclient.so.XX in /usr/lib/x86_64-linux-gnu (or similar)
    2. Download libmysqlclient.so.XX from Ubuntu website (eg. link for v20)
    3. Install lib using dpkg command sudo dpkg -i libmysqlclient(...).deb and sudo apt-get install -f
    4. Link lib: ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.XX.so libmysqlclient.XX.so

提交回复
热议问题