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

后端 未结 6 915
被撕碎了的回忆
被撕碎了的回忆 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条回答
  •  旧时难觅i
    2021-02-04 04:31

    just in case pip uninstall & pip install not working, and you dont want to set specific path to ld_library_path, what I did on my vps:

    cd /usr/local/lib
    sudo ln -s /path/to/your/libmysqlclient.so.20
    

    in my case my mysql is installed from linuxbrew (there is some reason to install inside home), so I had to navigate there $HOME/.linuxbrew/Cellar/mysql/5.7.18/lib/libmysqlclient.so.20

提交回复
热议问题