0

I am trying to dump tables in a database into a file using mysqldump. however I encountered

 bash-3.2$ /usr/local/var/mysql/virkdb/mysqldump --host=localhost --port=3306 -u root --databases virkdb --result-file=dump.sql
dyld: Library not loaded: @rpath/libssl.1.0.0.dylib
  Referenced from: /usr/local/var/mysql/virkdb/mysqldump
  Reason: image not found
Abort trap: 6

I am using macOS High Sierra and homebrew 1.8.6. I have tried to update and upgrade my brew but has not helped much.

I have relink openssl -

I used otool as suggested by @nino walker - here is the output

/usr/local/var/mysql/virkdb/mysqldump:
    @rpath/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
Areza
  • 5,623
  • 7
  • 48
  • 79

1 Answers1

0

The @rpath prefix indicates a load path relative to the executable.

You can inspect the dependencies of your binary by using otool

otool -L /usr/local/var/mysql/virkdb/mysqldump (try otool -l ... for lots of detail).

There is a helpful blog post here on how to use the tool and understand the underlying behavior: https://medium.com/@donblas/fun-with-rpath-otool-and-install-name-tool-e3e41ae86172

From that knowledge you can figure out if it's a build/packaging problem – and you may be able to resolve it by twiddling with environment variables.

Nino Walker
  • 2,742
  • 22
  • 30