Giter Site home page Giter Site logo

Comments (9)

morinel avatar morinel commented on August 13, 2024 4

Setting LD_LIBRARY_PATH nor DYLD_LIBRARY_PATH in $HOME/.bashrc worked for me when using PostgresApp on Mac OSX. It seems to ignore these environment variables when starting the helper app on login.

However, copying the file libmysqlclient.XYZ.dylib from MySQL's download to /usr/local/lib/libmysqlclient.dylib and restarting PostgesApp solved this problem for me. This works because the dlopen() system call as a final resort also looks into /usr/local/lib, as long as environment variable DYLD_FALLBACK_LIBRARY_PATH is not set.

Read man dlopen for more info.

from mysql_fdw.

ibrarahmad avatar ibrarahmad commented on August 13, 2024

You need to export the DYLD_LIBRARY_PATH on Mac OS

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/

On Thu, Jan 15, 2015 at 2:30 PM, Dataground [email protected]
wrote:

Mac OS-X 10.9.5: I followed instructions
All went well.

I tried:
CREATE EXTENSION mysql_fdw;

I Got:
ERROR: failed to load the mysql query:
dlopen(libmysqlclient.dylib, 1): image not found
HINT: export LD_LIBRARY_PATH to locate the library

********** Error **********

ERROR: failed to load the mysql query:
dlopen(libmysqlclient.dylib, 1): image not found
SQL state: HV00L
Hint: export LD_LIBRARY_PATH to locate the library


Reply to this email directly or view it on GitHub
#36.

Ibrar Ahmed
EnterpriseDB http://www.enterprisedb.com

from mysql_fdw.

dataground avatar dataground commented on August 13, 2024

Still no luck..

export DYLD_LIBRARY_PATH=/usr/local/mysql-connector-c-6.1.5-osx10.7-x86_64/lib

/Applications/Postgres.app/Contents/Versions/9.4/bin > ./psql
psql (9.4.0)
Type "help" for help.

pim=# CREATE EXTENSION mysql_fdw;
ERROR: failed to load the mysql query:
dlopen(libmysqlclient.dylib, 1): image not found
HINT: export LD_LIBRARY_PATH to locate the library
pim=#

from mysql_fdw.

ibrarahmad avatar ibrarahmad commented on August 13, 2024

It should work, please do these steps.

1 - Stop the postgres server
2 - On the same shell export DYLD_LIBRARY_PATH=/usr/local/
mysql-connector-c-6.1.5-osx10.7-x86_64/lib
3 - Start postgres server
4 - ./psql
5 - CREATE EXTENSION mysql_fdw;

Please send me listing of /usr/local/mysql-connector-c-6.1.5-osx10.7-x86_64/lib
folder.

ls /usr/local/mysql-connector-c-6.1.5-osx10.7-x86_64/lib

On Thu, Jan 15, 2015 at 8:13 PM, Dataground [email protected]
wrote:

Still no luck..

export
DYLD_LIBRARY_PATH=/usr/local/mysql-connector-c-6.1.5-osx10.7-x86_64/lib

/Applications/Postgres.app/Contents/Versions/9.4/bin > ./psql
psql (9.4.0)
Type "help" for help.

pim=# CREATE EXTENSION mysql_fdw;
ERROR: failed to load the mysql query:
dlopen(libmysqlclient.dylib, 1): image not found
HINT: export LD_LIBRARY_PATH to locate the library
pim=#


Reply to this email directly or view it on GitHub
#36 (comment)
.

Ibrar Ahmed
EnterpriseDB http://www.enterprisedb.com

from mysql_fdw.

dataground avatar dataground commented on August 13, 2024

It works! Thanks! I forgot to restart the server before...

from mysql_fdw.

benmadin avatar benmadin commented on August 13, 2024

Can I just add... after some frustration, on Mac OS X Yosemite it is not enough to sudo launchctl unload and load postgres to effect this - you actually have to su -m _postgres and use pg_ctl to stop and start.

cheers

Ben

from mysql_fdw.

eMerzh avatar eMerzh commented on August 13, 2024

I still have the issue, not sure if i did smth wrong but i can't get it to work.

echo $LD_LIBRARY_PATH
# /usr/local/mysql/lib:/usr/local/mysql-5.6.16-osx10.7-x86_64/lib/:
ls -l /usr/local/mysql-5.6.16-osx10.7-x86_64/lib/
# total 555328
# -rwxr-xr-x   1 myuser  admin    4282344 Jan 14  2014 libmysqlclient.18.dylib
# -rw-r--r--   1 myuser  admin   10599048 Jan 14  2014 libmysqlclient.a
# lrwxr-xr-x   1 myuser  admin         23 Mar  3  2014 libmysqlclient.dylib -> libmysqlclient.18.dylib
# lrwxr-xr-x   1 myuser  admin         23 Mar  3  2014 libmysqlclient_r.18.dylib -> libmysqlclient.18.dylib
# lrwxr-xr-x   1 myuser  admin         16 Mar  3  2014 libmysqlclient_r.a -> libmysqlclient.a
# lrwxr-xr-x   1 myuser  admin         20 Mar  3  2014 libmysqlclient_r.dylib -> libmysqlclient.dylib
# -rw-r--r--   1 myuser  admin  133369856 Jan 14  2014 libmysqld-debug.a
# -rw-r--r--   1 myuser  admin  136040000 Jan 14  2014 libmysqld.a
# -rw-r--r--   1 myuser  admin      14544 Jan 14  2014 libmysqlservices.a
# drwxr-xr-x  17 myuser  admin        578 Jan 14  2014 plugin
/Applications/Postgres.app/Contents/Versions/9.5/bin/pg_ctl -D "/Users/myuser/Library/Application Support/Postgres/var-9.5" stop
#waiting for server to shut down.... done
#server stopped

Applications/Postgres.app/Contents/Versions/9.5/bin/pg_ctl -D "/Users/myuser/Library/Application Support/Postgres/var-9.5" start
server starting
# LOG:  database system was shut down at 2016-01-10 11:43:39 CET
# LOG:  MultiXact member wraparound protections are now enabled
#  LOG:  database system is ready to accept connections
# LOG:  autovacuum launcher started

# psql -d mydb
# psql (9.5.0)
# mydb=# create extension mysql_fdw;
# ERROR:  failed to load the mysql query:
#   dlopen(libmysqlclient.dylib, 1): image not found
# HINT:  export LD_LIBRARY_PATH to locate the library
# STATEMENT:  create extension mysql_fdw;
# ERROR:  failed to load the mysql query:
# dlopen(libmysqlclient.dylib, 1): image not found
# HINT:  export LD_LIBRARY_PATH to locate the library

any idea?
(osx 10.11.2)

from mysql_fdw.

morinel avatar morinel commented on August 13, 2024

See my comment above for a workaround for MacOS X

from mysql_fdw.

eMerzh avatar eMerzh commented on August 13, 2024

arg! thanks a lot @morinel ... worked now :)

from mysql_fdw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.