2014.10.31

asawin@Asawins-MacBook-Air ~ % lib otool -L libpq.5.dylib
zsh: command not found: lib

asawin@Asawins-MacBook-Air ~ % install_name_tool
Usage: /Library/Developer/CommandLineTools/usr/bin/install_name_tool [-change old new] … [-rpath old new] … [-add_rpath new] … [-delete_rpath old] … [-id name] input

asawin@Asawins-MacBook-Air ~ % lib
zsh: command not found: lib

asawin@Asawins-MacBook-Air ~ % find / -name libpq.5.dylib 2>/dev/null
/System/Volumes/Data/Users/asawin/.pyenv/versions/3.12.7/envs/set-data-management-macos/lib/python3.12/site-packages/psycopg2/.dylibs/libpq.5.dylib
/System/Volumes/Data/Applications/Postgres.app/Contents/Versions/17/lib/libpq.5.dylib
/System/Volumes/Data/Applications/pgAdmin 4.app/Contents/Frameworks/libpq.5.dylib
/Users/asawin/.pyenv/versions/3.12.7/envs/set-data-management-macos/lib/python3.12/site-packages/psycopg2/.dylibs/libpq.5.dylib
/Applications/Postgres.app/Contents/Versions/17/lib/libpq.5.dylib
/Applications/pgAdmin 4.app/Contents/Frameworks/libpq.5.dylib

asawin@Asawins-MacBook-Air ~ % echo $PATH
/opt/homebrew/Cellar/pyenv-virtualenv/1.2.4/shims:/Users/asawin/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Applications/Postgres.app/Contents/Versions/17/lib

asawin@Asawins-MacBook-Air ~ % ls /Applications/Postgres.app/Contents/Versions/17/lib
gdalplugins libgeos_c.1.19.0.dylib libicutu.75.dylib libopenjp2.7.dylib libproj.dylib
libboost_serialization.dylib libgeos_c.1.dylib libicutu.dylib libopenjp2.dylib libssl.3.dylib
libboost_system.dylib libgeos_c.dylib libicuuc.75.1.dylib libpgcommon.a libssl.dylib
libboost_thread.dylib libicudata.75.1.dylib libicuuc.75.dylib libpgcommon_shlib.a libtiff.6.dylib
libboost_wserialization.dylib libicudata.75.dylib libicuuc.dylib libpgfeutils.a libtiff.dylib
libcrypto.3.dylib libicudata.dylib libjpeg.9.dylib libpgport.a libtiffxx.6.dylib
libcrypto.dylib libicui18n.75.1.dylib libjpeg.dylib libpgport_shlib.a libtiffxx.dylib
libecpg.6.dylib libicui18n.75.dylib libjson-c.5.4.0.dylib libpgtypes.3.dylib libxml2.2.dylib
libecpg.dylib libicui18n.dylib libjson-c.5.dylib libpgtypes.dylib libxml2.dylib
libecpg_compat.3.dylib libicuio.75.1.dylib libjson-c.dylib libpng.dylib libzstd.1.5.6.dylib
libecpg_compat.dylib libicuio.75.dylib liblz4.1.10.0.dylib libpng16.16.dylib libzstd.1.dylib
libgdal.34.3.8.5.dylib libicuio.dylib liblz4.1.dylib libpng16.dylib libzstd.dylib
libgdal.34.dylib libicutest.75.1.dylib liblz4.dylib libpq.5.dylib postgresql
libgdal.dylib libicutest.75.dylib libnetcdf.19.dylib libpq.dylib
libgeos.3.13.0.dylib libicutest.dylib libnetcdf.dylib libproj.25.9.5.0.dylib
libgeos.dylib libicutu.75.1.dylib libopenjp2.2.5.2.dylib libproj.25.dylib

asawin@Asawins-MacBook-Air ~ % otool
Usage: /Library/Developer/CommandLineTools/usr/bin/otool [-arch arch_type] [-fahlLDtdorSTMRIHGvVcXmqQjCP] [-mcpu=arg] [–version]
-f print the fat headers
-a print the archive header
-h print the mach header
-l print the load commands
-L print shared libraries used
-D print shared library id name
-t print the text section (disassemble with -v)
-x print all text sections (disassemble with -v)
-p start dissassemble from routine name
-s print contents of section
-d print the data section
-o print the Objective-C segment
-r print the relocation entries
-S print the table of contents of a library (obsolete)
-T print the table of contents of a dynamic shared library (obsolete)
-M print the module table of a dynamic shared library (obsolete)
-R print the reference table of a dynamic shared library (obsolete)
-I print the indirect symbol table
-H print the two-level hints table (obsolete)
-G print the data in code table
-v print verbosely (symbolically) when possible
-V print disassembled operands symbolically
-c print argument strings of a core file
-X print no leading addresses or headers
-m don’t use archive(member) syntax
-B force Thumb disassembly (ARM objects only)
-q use llvm’s disassembler (the default)
-Q use otool(1)’s disassembler
-mcpu=arg use `arg’ as the cpu for disassembly
-j print opcode bytes
-P print the info plist section as strings
-C print linker optimization hints
–version print the version of /Library/Developer/CommandLineTools/usr/bin/otool

asawin@Asawins-MacBook-Air ~ % otool -L libpq.5.dylib
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can’t open file: libpq.5.dylib (No such file or directory)

asawin@Asawins-MacBook-Air ~ % install_name_tool
Usage: /Library/Developer/CommandLineTools/usr/bin/install_name_tool [-change old new] … [-rpath old new] … [-add_rpath new] … [-delete_rpath old] … [-id name] input

asawin@Asawins-MacBook-Air ~ % nano ~/.profile

asawin@Asawins-MacBook-Air ~ % export DYLD_LIBRARY_PATH=/Applications/Postgres.app/Contents/Versions/17/lib:$DYLD_LIBRARY_PATH

asawin@Asawins-MacBook-Air ~ % echo $PATH
/opt/homebrew/Cellar/pyenv-virtualenv/1.2.4/shims:/Users/asawin/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Applications/Postgres.app/Contents/Versions/17/lib
asawin@Asawins-MacBook-Air ~ % echo $DYLD_LIBRARY_PATH
/Applications/Postgres.app/Contents/Versions/17/lib:

asawin@Asawins-MacBook-Air ~ % sudo ln -s /Applications/Postgres.app/Contents/Versions/17/lib/libpq.5.dylib /usr/local/lib/libpq.5.dylib
Password:
ln: /usr/local/lib/libpq.5.dylib: No such file or directory

asawin@Asawins-MacBook-Air ~ % sudo chmod 755 /Applications/Postgres.app/Contents/Versions/17/lib/libpq.5.dylib

asawin@Asawins-MacBook-Air ~ % sudo ln -s /Applications/Postgres.app/Contents/Versions/17/lib/libpq.5.dylib /usr/local/lib/libpq.5.dylib
ln: /usr/local/lib/libpq.5.dylib: No such file or directory

asawin@Asawins-MacBook-Air ~ % nano ~/.zshrc

asawin@Asawins-MacBook-Air ~ % source ~/.zshrc

asawin@Asawins-MacBook-Air ~ % echo $DYLD_LIBRARY_PATH
/Applications/Postgres.app/Contents/Versions/17/lib:/Applications/Postgres.app/Contents/Versions/17/lib:

asawin@Asawins-MacBook-Air ~ % nano ~/.profile

asawin@Asawins-MacBook-Air ~ % nano ~/.zshrc

asawin@Asawins-MacBook-Air ~ % echo $DYLD_LIBRARY_PATH
/Applications/Postgres.app/Contents/Versions/17/lib:/Applications/Postgres.app/Contents/Versions/17/lib:

asawin@Asawins-MacBook-Air ~ % echo $PATH
/opt/homebrew/Cellar/pyenv-virtualenv/1.2.4/shims:
/Users/asawin/.pyenv/shims:
/opt/homebrew/Cellar/pyenv-virtualenv/1.2.4/shims:
/opt/homebrew/bin:
/opt/homebrew/sbin:
/usr/local/bin:
/System/Cryptexes/App/usr/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:
/Library/Apple/usr/bin:
/Applications/Postgres.app/Contents/Versions/latest/bin:
/Applications/Postgres.app/Contents/Versions/17/lib:
/Applications/Postgres.app/Contents/Versions/17/lib

asawin@Asawins-MacBook-Air ~ %

Leave a Reply

The maximum upload file size: 500 MB. You can upload: image, audio, video, document, spreadsheet, interactive, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here