gaurav arora
gaurav arora

Reputation: 315

django runserver giving error for libmysqlclient_18 not defined in file libmysqlclient.so.18

on running django-server with django==1.9 and pgsql 9.5, virtualenv=15.0.9 with python2.7 installation no-wheel no-site-packages on ubuntu 14.04

no previous mysql installation prior mariadb==10.2 after which this error occured. tried purging mariadb then, installing mysql=5.6 from dpkg but it didn't solved it either, then reinstalled mariadb==10.2 for sudo apt-get install libmariadbclient but it didn't solved it either. Any help would be appreciated, .... getting the below error

enter image description here enter image description here

Upvotes: 0

Views: 296

Answers (1)

gaurav arora
gaurav arora

Reputation: 315

Solved. a gis plugin was being used in my project postgis and postgres used in project. for that the very initial postgres installation must have put libmysqlclient_18 version defined by its own customizations. after mariadb installation, the libmysqlclient.so.18 should have been updated, hindering the older linkage and setups.

ran the mysql/mariadb cleaning with this post https://askubuntu.com/a/172516/735971

installed mariadb again, got the gis support and issue is resolved. link to gis support libraries: http://scigeo.org/articles/howto-install-latest-geospatial-software-on-linux.html

update: got another error during running django server with postgresql==9.5 and postgis==2.2 Could not find the GEOS library (tried "geos_c", "GEOS"). Try setting GEOS_LIBRARY_PATH in your settings.

traced to evidence that mariadb-common files and libmysqlclient/libmariadblclient was still cached in apt-get evertime I installed postgresql or any of its extension now, it used the cached copy of libmysqlclient.so.18 from mariadb. so I removed all the unused dpkg configs sudo dpkg --purgeCOLUMNS=300 dpkg -l "" | egrep "^rc" | cut -d\ -f3 CAUTION: it can remove all the unused package, for only mariadb related files you can do sudo dpkg --purgeCOLUMNS=300 dpkg -l "maria" | egrep "^rc" | cut -d\ -f3 Also removed postgresql for the next clean installation overriding any traces of compiled libmysqlclient if any. then removed any apt-repo related to mariadb from /etc/apt/sources.list followed by sudo apt-get update. then apt-get autoremove and apt-get clean to clean everything. then sudo apt-get install -y postgresql-9.5 postgresql-9.5-postgis-2.2 postgresql-9.5-pgrouting postgresql-contrib-9.5

but i must say mariadb V10.2 still clashes with other installations and system libraries like it clashed in prior versions for libmysqlclient.so

Upvotes: 1

Related Questions